Skip to content

Commit 4ef08dc

Browse files
committed
Check that Servo was built correctly when building images (#6)
1 parent 4a3bf0a commit 4ef08dc

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

mount-runner.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,11 @@ else
1818
>&2 echo "fatal: failed to find $vm-part1 in /dev/zvol/$SERVO_CI_ZFS_PREFIX or /dev/zvol/$SERVO_CI_ZFS_CLONE_PREFIX"
1919
exit 1
2020
fi
21-
( cd $mount; "$@" || : )
21+
cd $mount
22+
set +e
23+
"$@"
24+
retval=$?
25+
set -e
26+
cd -
2227
umount $mount
28+
exit $retval

ubuntu2204/build-image.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ if ! time virsh event --timeout 2000 -- "$image_name" lifecycle; then
7171
exit 1
7272
fi
7373

74+
>&2 echo '[*] Checking that Servo was built correctly'
75+
./mount-runner.sh "$image_name" sh -c 'ls init/built_servo_once_successfully'
76+
7477
snapshot=$(date -u +\%FT\%RZ)
7578
>&2 echo "[*] Taking zvol snapshot: $SERVO_CI_ZFS_CLONE_PREFIX/$image_name@build-image-$snapshot"
7679
zfs snapshot "$SERVO_CI_ZFS_CLONE_PREFIX/$image_name@build-image-$snapshot"
7780

78-
# TODO: check that servo was actually built correctly
79-
8081
>&2 echo '[*] Done!'

windows10/build-image.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ if ! time virsh event --timeout 2500 -- "$image_name" lifecycle; then
6868
exit 1
6969
fi
7070

71+
>&2 echo '[*] Checking that Servo was built correctly'
72+
./mount-runner.sh "$image_name" sh -c 'ls -l init/built_servo_once_successfully'
73+
7174
snapshot=$(date -u +\%FT\%RZ)
7275
>&2 echo "[*] Taking zvol snapshot: $SERVO_CI_ZFS_CLONE_PREFIX/$image_name@build-image-$snapshot"
7376
zfs snapshot "$SERVO_CI_ZFS_CLONE_PREFIX/$image_name@build-image-$snapshot"
7477

75-
# TODO: check that servo was actually built correctly
76-
7778
>&2 echo '[*] Done!'

0 commit comments

Comments
 (0)