new_variant: clean-up on failure
If the build (launched by new_variant.py) fails, clean up the new
variant before exiting. Previous implementation had the clean up
for ~/.new_variant.yaml in the wrong place, and it wouldn't get
called from the exit handler.
TEST=See testdata/README.md for full details.
Use `&&` to run a second command if the first one passes.
`cd testdata ; ./new_variant_fulltest.sh hatch && echo PASS`
`cd testdata ; ./new_variant_fulltest.sh waddledoo && echo PASS`
The case with hatch will show "PASS" but because waddledoo has an
issue right now, that line won't show the "PASS".
Near the end, you'll see a call to new_variant.py --abort as the
script cleans up and exits. ~/.new_variant.yaml (in the chroot)
will not exist, because it got cleaned up by the --abort.
Tested-by: Paul Fagerburg <firstname.lastname@example.org>
Reviewed-by: Jack Rosenthal <email@example.com>
Commit-Queue: Paul Fagerburg <firstname.lastname@example.org>
1 file changed