summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEnguerrand Decorne <decorne.en@gmail.com>2022-03-15 17:10:10 +0100
committerDavid Allsopp <david.allsopp@metastack.com>2022-07-22 08:15:50 +0100
commitc8fc8c09b8774db2ced0be6cdb804d242bb54d1a (patch)
treebb8368bcc53c23dfd23f11548618e5f973b3a3c2 /tools
parent05114fb6bc633a8838a3fca3d281c9f81fee2ee7 (diff)
downloadocaml-c8fc8c09b8774db2ced0be6cdb804d242bb54d1a.tar.gz
actions: reuse build artifacts for the debug runtime run as well
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci/actions/runner.sh26
1 files changed, 14 insertions, 12 deletions
diff --git a/tools/ci/actions/runner.sh b/tools/ci/actions/runner.sh
index 7cae9a190a..539b8610ca 100755
--- a/tools/ci/actions/runner.sh
+++ b/tools/ci/actions/runner.sh
@@ -20,6 +20,7 @@ PREFIX=~/local
MAKE="make $MAKE_ARG"
SHELL=dash
+TEST_SEQUENTIALLY=$TEST_SEQUENTIALLY
export PATH=$PREFIX/bin:$PATH
@@ -71,17 +72,18 @@ Test () {
cd ..
}
-TestLoop () {
- echo Running testsuite for "$@"
- rm -f to_test.txt
- for test in "$@"
- do
- echo tests/$test >> to_test.txt
- done
- for it in {1..$2}
- do
- $MAKE -C testsuite one LIST=../to_test.txt || exit 1
- done || exit 1
+# By default, TestPrefix will attempt to run the tests
+# in the given directory in parallel.
+# Setting $TEST_SEQUENTIALLY will avoid this behaviour.
+TestPrefix () {
+ if [[ -z "${TEST_SEQUENTIALLY}" ]]; then
+ TO_RUN=parallel-"$1"
+ else
+ TO_RUN="one DIR=tests/$1"
+ fi
+ echo Running single testsuite directory with $TO_RUN
+
+ $MAKE -C testsuite $TO_RUN
cd ..
}
@@ -170,7 +172,7 @@ case $1 in
configure) Configure;;
build) Build;;
test) Test;;
-test_multicore) TestLoop "${@:3}";;
+test_prefix) TestPrefix $2;;
api-docs) API_Docs;;
install) Install;;
manual) BuildManual;;