Skip to content

Commit 1709f79

Browse files
authored
CI (Buildkite, code coverage): increase the value of JULIA_WORKER_TIMEOUT on the code coverage job (#42193)
1 parent c4f0d8b commit 1709f79

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

.buildkite/pipelines/scheduled/0_webui.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ steps:
2121
# verifies the treehash of the pipeline itself and the inputs listed in `inputs`
2222
signed_pipelines:
2323
- pipeline: .buildkite/pipelines/scheduled/coverage/coverage_linux64.yml
24-
signature: "U2FsdGVkX1+lpFo/nKzx3c6xCZPKYTAuunXpOsZG4+s4+iU5LfEpMvtNvpKQjDugRoxQxCItMqB6vr4KZN3KtKhjkLbr8ExAyaPil/N/uFhrLlpwNem9dxHbPrU2l7qo"
24+
signature: U2FsdGVkX1+FtqbbxyzoI/j0InDefRQ3OR06BAM2EWRhDG3SiwiPcOREudCTJ+1Z+AEVwVz5KTgw9lBVO1yjcWts3XePIy/W+arN4V+t97Dfuf4wsAr9ubpQ10GaoFnK

.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ steps:
2929
git config --global init.defaultBranch master
3030
3131
echo "--- Run Julia tests in parallel with code coverage enabled"
32-
./julia --code-coverage=all --sysimage-native-code=no .buildkite/pipelines/scheduled/coverage/run_tests_parallel.jl
32+
export JULIA_NUM_THREADS=1
33+
export JULIA_WORKER_TIMEOUT=1200 # 1200 seconds = 20 minutes
34+
./julia -e 'import Distributed; @info "" Distributed.worker_timeout()'
35+
./julia .buildkite/pipelines/scheduled/coverage/run_tests_parallel.jl
3336
3437
echo "--- Process and upload coverage information"
3538
./julia .buildkite/pipelines/scheduled/coverage/upload_coverage.jl
Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
# Important note: even if one or more tests fail, we will still exit with status code 0.
2-
2+
#
33
# The reason for this is that we always want to upload code coverage, even if some of the
44
# tests fail. Therefore, even if the `coverage_linux64` builder passes, you should not
55
# assume that all of the tests passed. If you want to know if all of the tests are passing,
66
# please look at the status of the `tester_*` builders (e.g. `tester_linux64`).
77

8-
# When running this file, make sure to set all of the following command-line flags:
9-
# 1. `--code-coverage=all`
10-
# 2. `--sysimage-native-code=no`
8+
const ncores = Sys.CPU_THREADS
9+
@info "" Sys.CPU_THREADS
10+
@info "" ncores
1111

12-
empty!(Base.DEPOT_PATH)
13-
push!(Base.DEPOT_PATH, mktempdir(; cleanup = true))
12+
script_native_yes = """
13+
Base.runtests(["cmdlineargs"]; ncores = $(ncores))
14+
"""
15+
script_native_no = """
16+
Base.runtests(["all", "--skip", "cmdlineargs"]; ncores = $(ncores))
17+
"""
1418

15-
const tests = "all"
16-
const ncores = Sys.CPU_THREADS
19+
base_cmd = `$(Base.julia_cmd()) --code-coverage=all`
20+
cmd_native_yes = `$(base_cmd) --sysimage-native-code=yes -e $(script_native_yes)`
21+
cmd_native_no = `$(base_cmd) --sysimage-native-code=no -e $(script_native_no)`
1722

18-
@info "" Sys.CPU_THREADS
19-
@info "" tests ncores
23+
@info "Running command" cmd_native_yes
24+
p1 = run(pipeline(cmd_native_yes; stdin, stdout, stderr); wait = false)
25+
wait(p1)
2026

21-
try
22-
Base.runtests(tests; ncores)
23-
catch ex
24-
@error "" exception=(ex, catch_backtrace())
25-
end
27+
@info "Running command" cmd_native_no
28+
p2 = run(pipeline(cmd_native_no; stdin, stdout, stderr); wait = false)
29+
wait(p2)

0 commit comments

Comments
 (0)