To test the error recovery functions in the various shell scripts, add false
in various places to induce failure and observe that everything is cleaned up.
For each test case, run add_variant_to_yaml.sh hatch tiamat
Add false
at the following places in the script:
revbump_ebuild
git add "${YAML}"
git commit
git commit
Check /mnt/host/source/src/overlays
to ensure the branch has been deleted and no changes or new files are left.
For each test case, run copy_cras_config.sh zork trembyle grue
Add false
at the following places in the script:
revbump_ebuild
mkdir
cp
git add
git commit
git commit
Check /mnt/host/source/src/overlays
to ensure the branch has been deleted and no changes or new files are left.
For each test case, run create_coreboot_config.sh hatch hatch tiamat
Add false
at the following places in the script:
sed
git add
git commit
git commit
Check /mnt/host/source/src/third_party/chromiumos-overlay
to ensure the branch has been deleted and no changes or new files are left.
For each test case, run CB_SRC_DIR=/mnt/host/source/src/third_party/coreboot create_coreboot_variant.sh hatch hatch tiamat
Add false
at the following places in the script:
kconfig.py
mv
git add
git commit
git commit
Check /mnt/host/source/src/third_party/coreboot
to ensure the branch has been deleted and no changes or new files are left.
For each test case, run create_initial_ec_image.sh hatch tiamat
Add false
at the following places in the script:
mkdir
cp
find
make
git add
git commit
git commit
Check /mnt/host/source/src/platform/ec/board
to ensure the branch has been deleted and no changes or new files are left.
fw_build_config.sh
is not tested here. Because of the scripts use repo
and git
commands, it is not sufficient to create a directory with the required files.
Perform the test in /mnt/host/source/src/private-overlays/overlay-hatch-private/chromeos-base/chromeos-config-bsp-hatch-private
.
For each test case, run add_variant.sh tiamat
Add false
at the following places in the script:
sed
cat
git add
git commit
git commit
Check the local directory to ensure the branch has been deleted and no changes or new files are left.
Perform the test in /mnt/host/source/src/private-overlays/baseboard-hatch-private/sys-boot/coreboot-private-files-hatch/files
.
For each test case, run add_fitimage.sh tiamat
Add false
at the following places in add_fitimage.sh
:
sed
git add
git commit
git commit
Check the local directory to ensure the branch has been deleted and no changes or new files are left.
With add_fitimage.sh
succeeding now, for each test case, run
./add_fitimage.sh tiamat cp files/fitimage-hatch.bin ../asset_generation/outputs/fitimage-tiamat.bin cp files/fitimage-hatch-versions.txt ../asset_generation/outputs/fitimage-tiamat-versions.txt echo test >> ../asset_generation/outputs/fit.log ./commit_fitimage.sh tiamat
Add false
at the following places in commit_fitimage.sh
:
cp
commandsgit add
commandsgit commit
git commit
Check the local directory to ensure the branch has been deleted and no changes or new files are left.
Perform the test in /mnt/host/source/src/private-overlays/baseboard-volteer-private/sys-boot/coreboot-private-files-baseboard-volteer/files
.
For each test case, run add_fitimage.sh gnastygnorc
Add false
at the following places in add_fitimage.sh
:
cp
git add
for the CSV filesed
git add
git commit
git commit
Check the local directory to ensure the branch has been deleted and no changes or new files are left.
With add_fitimage.sh
succeeding now, for each test case, run
./add_fitimage.sh gnastygnorc cp fitimage-volteer.bin ../asset_generation/outputs/fitimage-gnastygnorc.bin cp fitimage-volteer-versions.txt ../asset_generation/outputs/fitimage-gnastygnorc-versions.txt cp ../asset_generation/outputs/fit-volteer.log ../asset_generation/outputs/fit-gnastygnorc.log cp blobs/descriptor-volteer.bin blobs/descriptor-gnastygnorc.bin cp blobs/csme-volteer.bin blobs/csme-gnastygnorc.bin ./commit_fitimage.sh gnastygnorc
Add false
at the following places in commit_fitimage.sh
:
cp
commandsgit add
commandsgit commit
git commit
Check the local directory to ensure the branch has been deleted and no changes or new files are left.
Perform the test in /mnt/host/source/src/private-overlays/baseboard-dedede-private/sys-boot/coreboot-private-files-baseboard-dedede/files
.
For each test case, run add_fitimage.sh kingitchy
Add false
at the following places in add_fitimage.sh
:
sed
git add
git commit
git commit
Check the local directory to ensure the branch has been deleted and no changes or new files are left.
With add_fitimage.sh
succeeding now, for each test case, run
./add_fitimage.sh kingitchy cp blobs/fitimage-waddledee.bin ../asset_generation/outputs/fitimage-kingitchy.bin cp blobs/fitimage-waddledee-versions.txt ../asset_generation/outputs/fitimage-kingitchy-versions.txt echo test >> ../asset_generation/outputs/fit.log ./commit_fitimage.sh kingitchy
Add false
at the following places in commit_fitimage.sh
:
cp
commandsgit add
commandsgit commit
git commit
Check the local directory to ensure the branch has been deleted and no changes or new files are left.
Perform the test in /mnt/host/source/src/private-overlays/bbaseboard-puff-private/sys-boot/coreboot-private-files-puff/files
.
For each test case, run add_fitimage.sh tiamat
Add false
at the following places in add_fitimage.sh
:
sed
git add
git commit
git commit
Check the local directory to ensure the branch has been deleted and no changes or new files are left.
With add_fitimage.sh
succeeding now, for each test case, run
./add_fitimage.sh tiamat cp fitimage-puff.bin ../asset_generation/outputs/fitimage-tiamat.bin cp fitimage-puff-versions.txt ../asset_generation/outputs/fitimage-tiamat-versions.txt ./commit_fitimage.sh tiamat
Add false
at the following places in commit_fitimage.sh
:
cp
commandsgit add
commandsgit commit
git commit
Check the local directory to ensure the branch has been deleted and no changes or new files are left.