forked from squeak-smalltalk/squeak-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
builtastic.sh
executable file
·45 lines (35 loc) · 1.93 KB
/
builtastic.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#! /bin/sh
: ${WORKSPACE:=`pwd`} # Default to the current directory to ease testing
TEST_IMAGE_NAME="Squeak4.4-trunk"
IMAGE_NAME="TrunkImage"
RUN_TEST_IMAGE_NAME="PostTestTrunkImage"
VM="$WORKSPACE/coglinux/bin/squeak"
INTERPRETER_VM="/usr/local/bin/squeak" # The path used in ./build-local.sh
mkdir -p "$WORKSPACE/target/"
cp "$WORKSPACE/$TEST_IMAGE_NAME.image" "$WORKSPACE/target/$IMAGE_NAME.image"
cp "$WORKSPACE/$TEST_IMAGE_NAME.changes" "$WORKSPACE/target/$IMAGE_NAME.changes"
cp "$WORKSPACE/SqueakV41.sources" "$WORKSPACE/target/SqueakV41.sources"
cp "$WORKSPACE/HudsonBuildTools.st" "$WORKSPACE/target/HudsonBuildTools.st"
# Update the image
$VM -vm-sound-null -vm-display-null "$WORKSPACE/target/$IMAGE_NAME.image" "$WORKSPACE/update-image.st"
# Run the image through an interpreter VM to make sure the image format is correct.
# Find a copy of the ckformat program, any one will do
CKFORMAT=`find /usr/local/lib/squeak -name ckformat | head -1`
if test -x "$CKFORMAT"; then
echo before format conversion: "$WORKSPACE/target/$IMAGE_NAME.image" image format `${CKFORMAT} "$WORKSPACE/target/$IMAGE_NAME.image"`
else
echo WARNING: no ckformat found
fi
if test -f $INTERPRETER_VM; then
$INTERPRETER_VM -vm-sound-null -vm-display-null "$WORKSPACE/target/$IMAGE_NAME.image" "$WORKSPACE/save-image.st"
else
echo WARNING: $INTERPRETER_VM not found, image not converted to format 6504
fi
if test -x "$CKFORMAT"; then
echo after format conversion: "$WORKSPACE/target/$IMAGE_NAME.image" image format `${CKFORMAT} "$WORKSPACE/target/$IMAGE_NAME.image"`
fi
# Copy the clean image so we can run the tests without touching the artifact.
cp "$WORKSPACE/target/$IMAGE_NAME.image" "$WORKSPACE/target/$RUN_TEST_IMAGE_NAME.image"
cp "$WORKSPACE/target/$IMAGE_NAME.changes" "$WORKSPACE/target/$RUN_TEST_IMAGE_NAME.changes"
# Run the tests and snapshot the image post-test.
$VM -vm-sound-null -vm-display-null "$WORKSPACE/target/$RUN_TEST_IMAGE_NAME.image" "$WORKSPACE/tests.st"