8
8
set -o pipefail
9
9
set -o nounset
10
10
11
+ # Test for platform
12
+ PLATFORM=$( uname -sp)
13
+ if [[ $PLATFORM == " Linux x86_64" ]]
14
+ then
15
+ TARGET=" x86_64-unknown-linux-gnu"
16
+ elif [[ $PLATFORM == " Darwin i386" ]]
17
+ then
18
+ TARGET=" x86_64-apple-darwin"
19
+ fi
20
+
11
21
SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
12
22
export PATH=$SCRIPT_DIR :$PATH
13
23
EXTRA_X_PY_BUILD_ARGS=" ${EXTRA_X_PY_BUILD_ARGS:- } "
@@ -30,10 +40,36 @@ check-cbmc-viewer-version.py --major 2 --minor 5
30
40
# Build tool for linking RMC pointer restrictions
31
41
cargo build --release --manifest-path src/tools/rmc-link-restrictions/Cargo.toml
32
42
33
- # Standalone rmc tests, expected tests, and cargo tests
34
- ./x.py build -i src/tools/compiletest --stage 0
35
- export COMPILETEST_FORCE_STAGE0=1 # We don't care about the stage anymore. Remove this once we replace ./x.py test
36
- ./x.py test -i --stage 0 rmc firecracker prusti smack expected cargo-rmc rmc-docs rmc-fixme
43
+ # Build compiletest
44
+ (cd " ${RMC_DIR} /src/tools/compiletest" ; cargo build --release)
45
+
46
+ # Declare testing suite information (suite and mode)
47
+ TESTS=(
48
+ " rmc rmc"
49
+ " firecracker rmc"
50
+ " prusti rmc"
51
+ " smack rmc"
52
+ " expected expected"
53
+ " cargo-rmc cargo-rmc"
54
+ " rmc-docs cargo-rmc"
55
+ " rmc-fixme rmc-fixme"
56
+ )
57
+
58
+ # Extract testing suite information and run compiletest
59
+ for testp in " ${TESTS[@]} " ; do
60
+ testl=($testp )
61
+ suite=${testl[0]}
62
+ mode=${testl[1]}
63
+ echo " Check compiletest suite=$suite mode=$mode ($TARGET -> $TARGET )"
64
+ # Note: `cargo-rmc` tests fail if we do not add `$(pwd)` to `--build-base`
65
+ # Tracking issue: https://github.com/model-checking/rmc/issues/755
66
+ ./target/release/compiletest --rmc-dir-path scripts --src-base src/test/$suite \
67
+ --build-base $( pwd) /build/$TARGET /test/$suite \
68
+ --stage-id stage1-$TARGET \
69
+ --suite $suite --mode $mode \
70
+ --target $TARGET --host $TARGET \
71
+ --quiet --channel dev
72
+ done
37
73
38
74
# Check codegen for the standard library
39
75
time " $SCRIPT_DIR " /std-lib-regression.sh
0 commit comments