|
1 | 1 | # Important note: even if one or more tests fail, we will still exit with status code 0.
|
2 |
| - |
| 2 | +# |
3 | 3 | # The reason for this is that we always want to upload code coverage, even if some of the
|
4 | 4 | # tests fail. Therefore, even if the `coverage_linux64` builder passes, you should not
|
5 | 5 | # assume that all of the tests passed. If you want to know if all of the tests are passing,
|
6 | 6 | # please look at the status of the `tester_*` builders (e.g. `tester_linux64`).
|
7 | 7 |
|
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 |
11 | 11 |
|
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 | +""" |
14 | 18 |
|
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)` |
17 | 22 |
|
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) |
20 | 26 |
|
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