Skip to content

Commit 1739699

Browse files
DilumAluthgeKristofferC
authored andcommitted
CI (Buildkite): reorganize some of the logic in the tester_linux.yml file (#42514)
(cherry picked from commit 7782330)
1 parent 8cf01e5 commit 1739699

File tree

1 file changed

+30
-14
lines changed

1 file changed

+30
-14
lines changed

.buildkite/pipelines/main/platforms/tester_linux.yml

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,40 @@ steps:
5252
echo "JULIA_CPU_THREADS is: $${JULIA_CPU_THREADS:?}"
5353
$${JULIA_BINARY:?} -e '@info "" Sys.CPU_THREADS'
5454
55-
echo "--- Run the Julia test suite"
55+
echo "--- Set some environment variables in preparation for running the Julia test suite"
5656
unset JULIA_DEPOT_PATH
57-
export JULIA_UNDER_RR="$${JULIA_BINARY:?} .buildkite/utilities/rr/rr_capture.jl $${JULIA_BINARY:?}"
5857
export OPENBLAS_NUM_THREADS=8
58+
export TESTS="[\"all\"]"
59+
60+
if [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_rr" ]]; then
61+
export JULIA_BINARY_UNDER_RR="$${JULIA_BINARY:?} .buildkite/utilities/rr/rr_capture.jl $${JULIA_BINARY:?}"
62+
63+
export JULIA_BINARY_FOR_TESTS="$${JULIA_BINARY_UNDER_RR:?}"
64+
export NCORES_FOR_TESTS="parse(Int, ENV[\"JULIA_RRCAPTURE_NUM_CORES\"])"
5965
60-
if [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_rr" ]]; then
6166
# For the `rr` job, we disable multi-threading.
6267
export JULIA_NUM_THREADS=1
63-
$${JULIA_UNDER_RR:?} -e 'Base.runtests(["all"]; ncores = parse(Int, ENV["JULIA_RRCAPTURE_NUM_CORES"]))'
64-
elif [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_st" ]]; then
65-
# "_st" = single-threaded
66-
export JULIA_NUM_THREADS=1
67-
$${JULIA_BINARY:?} -e 'Base.runtests(["all"]; ncores = Sys.CPU_THREADS)'
68-
elif [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_mt" ]]; then
69-
# "_mt" = multi-threaded
70-
export JULIA_NUM_THREADS=16
71-
# TODO: don't skip any tests
72-
$${JULIA_BINARY:?} -e 'Base.runtests(["all", "--skip", "Distributed"]; ncores = Sys.CPU_THREADS)'
7368
else
74-
$${JULIA_BINARY:?} -e 'Base.runtests(["all"]; ncores = Sys.CPU_THREADS)'
69+
export JULIA_BINARY_FOR_TESTS="$${JULIA_BINARY:?}"
70+
export NCORES_FOR_TESTS="Sys.CPU_THREADS"
71+
72+
if [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_st" ]]; then
73+
# "_st" = single-threaded
74+
export JULIA_NUM_THREADS=1
75+
elif [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_mt" ]]; then
76+
# "_mt" = multi-threaded
77+
export JULIA_NUM_THREADS=16
78+
79+
# We do not run the Distributed test suite when multithreading is enabled.
80+
export TESTS="[\"all\", \"--skip\", \"Distributed\"]"
81+
fi
7582
fi
83+
84+
echo "JULIA_BINARY_FOR_TESTS is: $${JULIA_BINARY_FOR_TESTS:?}"
85+
echo "JULIA_NUM_THREADS is: $${JULIA_NUM_THREADS}" # this variable might not be set
86+
echo "NCORES_FOR_TESTS is: $${NCORES_FOR_TESTS:?}"
87+
echo "OPENBLAS_NUM_THREADS is: $${OPENBLAS_NUM_THREADS:?}"
88+
echo "TESTS is: $${TESTS:?}"
89+
90+
echo "--- Run the Julia test suite"
91+
$${JULIA_BINARY_FOR_TESTS:?} -e "Base.runtests($${TESTS:?}; ncores = $${NCORES_FOR_TESTS:?})"

0 commit comments

Comments
 (0)