1
0
Fork 0

smoke test : remove temporary files afterwards

This commit is contained in:
Daniel Barlow 2022-09-24 21:13:15 +01:00
parent 8dd7bb958a
commit 0f999f9ae4
1 changed files with 4 additions and 2 deletions

View File

@ -2,10 +2,12 @@ set -e
NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-build '<liminix>' -I liminix-config=./configuration.nix --arg device "import <liminix/devices/$DEVICE.nix>" -A outputs.squashfs -o smoke.img $*
TESTS=$(cat <<"EOF"
trap 'echo "command $(eval echo $BASH_COMMAND) failed with exit code $?"; exit $?' ERR
test -n "${TMPDIR}"
dest_path=${TMPDIR}/smoke.img-$$
echo $dest_path
cleanup(){ test -n ${dest_path} && test -d ${dest_path} && chmod -R +w ${dest_path} && rm -rf ${dest_path}; }
trap cleanup EXIT
trap 'echo "command $(eval echo $BASH_COMMAND) failed with exit code $?"; exit $?' ERR
unsquashfs -q -d $dest_path -excludes smoke.img /dev
cd $dest_path;
db=nix/store/*-s6-rc-db/compiled/