-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-test-bucket
executable file
·112 lines (96 loc) · 4.11 KB
/
run-test-bucket
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/usr/bin/env bash
# Run Helper script for running test buckets across different CI systems.
#
# The CI tests for rocket-chip are split up into a number of different buckets
# in order to parallelize the test suite. The buckets are each assigned a
# number, starting with 1. To edit the buckets, simply edit the main `case`
# statement below.
set -euo pipefail
print_usage() {
echo "Usage: ${0} bucket-number"
}
if [[ $# -ne 1 ]]; then
echo "Missing required argument: test bucket number" >&2
print_usage
exit 1
fi
regression_dir=$(cd "$(dirname "$0")" ; pwd -P)
rocketchip_dir=$(dirname "${regression_dir}")
if [[ ${TRAVIS:-false} == true ]]; then
# If running on Travis CI, make sure that travis_wait is defined.
. "${regression_dir}/travis_whereami.bash"
. "${regression_dir}/travis_setup_env.bash"
. "${regression_dir}/travis_jigger.bash"
. "${regression_dir}/travis_wait.bash"
set +u
travis_setup_env
set -u
else
# If not running on Travis CI, Stub out the travis_wait to be a no-op, since
# it's unnecessary and it has some undesirable side effects such as hiding
# console output until the command finishes.
travis_wait() {
# Throw out first argument, which is the wait time in minutes.
shift
# Run the remaining arguments as a normal command.
"$@"
}
fi
# Always run from the root rocket-chip directory.
cd "${rocketchip_dir}"
# Test bucket definitions
bucket_number=$1
set -x
case "${bucket_number}" in
1)
# Temporarily disable this bucket, which is hitting OOM on Actions
#travis_wait 100 make emulator-ndebug -C regression SUITE=UnittestSuite JVM_MEMORY=3G VERILATOR_THREADS=1
#travis_wait 100 make emulator-regression-tests -C regression SUITE=UnittestSuite JVM_MEMORY=3G VERILATOR_THREADS=1
;;
2)
travis_wait 80 make emulator-ndebug -C regression SUITE=JtagDtmSuite JVM_MEMORY=3G
travis_wait 80 make emulator-jtag-dtm-tests-32 -C regression SUITE=JtagDtmSuite JVM_MEMORY=3G
travis_wait 80 make emulator-jtag-dtm-tests-64 -C regression SUITE=JtagDtmSuite JVM_MEMORY=3G
travis_wait 80 make emulator-jtag-dtm-tests-32 -C regression SUITE=JtagDtmSuite JTAG_DTM_TEST=DebugTest JVM_MEMORY=3G
travis_wait 80 make emulator-jtag-dtm-tests-64 -C regression SUITE=JtagDtmSuite JTAG_DTM_TEST=DebugTest JVM_MEMORY=3G
;;
3)
travis_wait 80 make emulator-ndebug -C regression SUITE=JtagDtmSuite JTAG_DTM_ENABLE_SBA=on JVM_MEMORY=3G
travis_wait 80 make emulator-jtag-dtm-tests-32 -C regression SUITE=JtagDtmSuite JTAG_DTM_TEST=MemTest64 JTAG_DTM_ENABLE_SBA=on JVM_MEMORY=3G
travis_wait 80 make emulator-jtag-dtm-tests-64 -C regression SUITE=JtagDtmSuite JTAG_DTM_TEST=MemTest64 JTAG_DTM_ENABLE_SBA=on JVM_MEMORY=3G
travis_wait 80 make emulator-jtag-dtm-tests-32 -C regression SUITE=JtagDtmSuite JTAG_DTM_TEST=MemTest32 JTAG_DTM_ENABLE_SBA=on JVM_MEMORY=3G
travis_wait 80 make emulator-jtag-dtm-tests-64 -C regression SUITE=JtagDtmSuite JTAG_DTM_TEST=MemTest32 JTAG_DTM_ENABLE_SBA=on JVM_MEMORY=3G
travis_wait 80 make emulator-jtag-dtm-tests-32 -C regression SUITE=JtagDtmSuite JTAG_DTM_TEST=MemTest8 JTAG_DTM_ENABLE_SBA=on JVM_MEMORY=3G
;;
4)
travis_wait 80 make emulator-ndebug -C regression SUITE=RocketSuiteB JVM_MEMORY=3G
travis_wait 80 make emulator-regression-tests -C regression SUITE=RocketSuiteB JVM_MEMORY=3G
;;
5)
travis_wait 80 make emulator-ndebug -C regression SUITE=RocketSuiteA JVM_MEMORY=3G
travis_wait 80 make emulator-regression-tests -C regression SUITE=RocketSuiteA JVM_MEMORY=3G
;;
6)
travis_wait 80 make emulator-ndebug -C regression SUITE=RocketSuiteC JVM_MEMORY=3G
make emulator-regression-tests -C regression SUITE=RocketSuiteC JVM_MEMORY=3G
;;
7)
travis_wait 100 make emulator-ndebug -C regression SUITE=Miscellaneous JVM_MEMORY=3G
;;
8)
make scalatest -C regression SUITE=foo JVM_MEMORY=8G
;;
9)
make scalafix-check -C regression SUITE=foo JVM_MEMORY=8G
;;
10)
./scripts/swap-sbt-build
make scalatest -C regression SUITE=foo JVM_MEMORY=8G
;;
-h|--help)
print_usage
;;
*)
echo "Error: Invalid bucket number: ${bucket_number}"
exit 2;
esac