1
1
#! /bin/bash
2
2
set -euo pipefail
3
- set -x
3
+
4
+ function begingroup {
5
+ echo " ::group::$1 "
6
+ set -x
7
+ }
8
+
9
+ function endgroup {
10
+ set +x
11
+ echo " ::endgroup"
12
+ }
13
+
14
+ begingroup " Building Miri"
4
15
5
16
# Determine configuration for installed build
6
17
echo " Installing release version of Miri"
@@ -14,14 +25,15 @@ export CARGO_EXTRA_FLAGS="--locked"
14
25
./miri check --no-default-features # make sure this can be built
15
26
./miri check --all-features # and this, too
16
27
./miri build --all-targets # the build that all the `./miri test` below will use
17
- echo
28
+
29
+ endgroup
18
30
19
31
# Test
20
32
function run_tests {
21
33
if [ -n " ${MIRI_TEST_TARGET+exists} " ]; then
22
- echo " Testing foreign architecture $MIRI_TEST_TARGET "
34
+ begingroup " Testing foreign architecture $MIRI_TEST_TARGET "
23
35
else
24
- echo " Testing host architecture"
36
+ begingroup " Testing host architecture"
25
37
fi
26
38
27
39
# # ui test suite
@@ -52,7 +64,6 @@ function run_tests {
52
64
echo ' build.rustc-wrapper = "thisdoesnotexist"' > .cargo/config.toml
53
65
# Run the actual test
54
66
${PYTHON} test-cargo-miri/run-test.py
55
- echo
56
67
# Clean up
57
68
unset RUSTC MIRI
58
69
rm -rf .cargo
@@ -63,20 +74,24 @@ function run_tests {
63
74
cargo miri run --manifest-path bench-cargo-miri/$BENCH /Cargo.toml
64
75
done
65
76
fi
77
+
78
+ endgroup
66
79
}
67
80
68
81
function run_tests_minimal {
69
82
if [ -n " ${MIRI_TEST_TARGET+exists} " ]; then
70
- echo " Testing MINIMAL foreign architecture $MIRI_TEST_TARGET : only testing $@ "
83
+ begingroup " Testing MINIMAL foreign architecture $MIRI_TEST_TARGET : only testing $@ "
71
84
else
72
- echo " Testing MINIMAL host architecture: only testing $@ "
85
+ begingroup " Testing MINIMAL host architecture: only testing $@ "
73
86
fi
74
87
75
88
./miri test -- " $@ "
76
89
77
90
# Ensure that a small smoke test of cargo-miri works.
78
91
# Note: This doesn't work on windows because of TLS.
79
92
cargo miri run --manifest-path test-cargo-miri/no-std-smoke/Cargo.toml
93
+
94
+ endgroup
80
95
}
81
96
82
97
# host
0 commit comments