Skip to content

Commit

Permalink
Check that Servo was built correctly when building images (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
delan committed Jan 2, 2025
1 parent 4a3bf0a commit 4ef08dc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 7 additions & 1 deletion mount-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,11 @@ else
>&2 echo "fatal: failed to find $vm-part1 in /dev/zvol/$SERVO_CI_ZFS_PREFIX or /dev/zvol/$SERVO_CI_ZFS_CLONE_PREFIX"
exit 1
fi
( cd $mount; "$@" || : )
cd $mount
set +e
"$@"
retval=$?
set -e
cd -
umount $mount
exit $retval
5 changes: 3 additions & 2 deletions ubuntu2204/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ if ! time virsh event --timeout 2000 -- "$image_name" lifecycle; then
exit 1
fi

>&2 echo '[*] Checking that Servo was built correctly'
./mount-runner.sh "$image_name" sh -c 'ls init/built_servo_once_successfully'

snapshot=$(date -u +\%FT\%RZ)
>&2 echo "[*] Taking zvol snapshot: $SERVO_CI_ZFS_CLONE_PREFIX/$image_name@build-image-$snapshot"
zfs snapshot "$SERVO_CI_ZFS_CLONE_PREFIX/$image_name@build-image-$snapshot"

# TODO: check that servo was actually built correctly

>&2 echo '[*] Done!'
5 changes: 3 additions & 2 deletions windows10/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ if ! time virsh event --timeout 2500 -- "$image_name" lifecycle; then
exit 1
fi

>&2 echo '[*] Checking that Servo was built correctly'
./mount-runner.sh "$image_name" sh -c 'ls -l init/built_servo_once_successfully'

snapshot=$(date -u +\%FT\%RZ)
>&2 echo "[*] Taking zvol snapshot: $SERVO_CI_ZFS_CLONE_PREFIX/$image_name@build-image-$snapshot"
zfs snapshot "$SERVO_CI_ZFS_CLONE_PREFIX/$image_name@build-image-$snapshot"

# TODO: check that servo was actually built correctly

>&2 echo '[*] Done!'

0 comments on commit 4ef08dc

Please sign in to comment.