@@ -28,11 +28,10 @@ const TESTNAMES = [
28
28
" boundscheck" , " error" , " ambiguous" , " cartesian" , " osutils" ,
29
29
" channels" , " iostream" , " secretbuffer" , " specificity" ,
30
30
" reinterpretarray" , " syntax" , " corelogging" , " missing" , " asyncmap" ,
31
- " smallarrayshrink" , " opaque_closure" , " filesystem" , " download"
31
+ " smallarrayshrink" , " opaque_closure" , " filesystem" , " download" ,
32
32
]
33
33
34
34
"""
35
-
36
35
`(; tests, net_on, exit_on_error, seed) = choosetests(choices)` selects a set of tests to be
37
36
run. `choices` should be a vector of test names; if empty or set to
38
37
`["all"]`, all tests are selected.
@@ -65,7 +64,7 @@ function choosetests(choices = [])
65
64
exit_on_error = false
66
65
use_revise = false
67
66
seed = rand (RandomDevice (), UInt128)
68
- force_net = false
67
+ ci_option_passed = false
69
68
dryrun = false
70
69
71
70
for (i, t) in enumerate (choices)
@@ -77,9 +76,9 @@ function choosetests(choices = [])
77
76
elseif t == " --revise"
78
77
use_revise = true
79
78
elseif startswith (t, " --seed=" )
80
- seed = parse (UInt128, t[8 : end ])
81
- elseif t == " --force-net "
82
- force_net = true
79
+ seed = parse (UInt128, t[( length ( " --seed= " ) + 1 ) : end ])
80
+ elseif t == " --ci "
81
+ ci_option_passed = true
83
82
elseif t == " --help-list"
84
83
dryrun = true
85
84
elseif t == " --help"
@@ -98,7 +97,11 @@ function choosetests(choices = [])
98
97
99
98
Or prefix a name with `-` (such as `-core`) to skip a particular test.
100
99
""" )
101
- return [], false , false , false , UInt128 (0 )
100
+ return (; tests = [],
101
+ net_on = false ,
102
+ exit_on_error = false ,
103
+ use_revise = false ,
104
+ seed = UInt128 (0 ))
102
105
elseif startswith (t, " --" )
103
106
error (" unknown option: $t " )
104
107
elseif startswith (t, " -" )
@@ -129,8 +132,8 @@ function choosetests(choices = [])
129
132
end
130
133
end
131
134
132
- explicit_pkg = " Pkg" in tests
133
- explicit_libgit2 = " LibGit2/online" in tests
135
+ explicit_pkg = " Pkg" in tests
136
+ explicit_libgit2_online = " LibGit2/online" in tests
134
137
135
138
filtertests! (tests, " unicode" , [" unicode/utf8" ])
136
139
filtertests! (tests, " strings" , [" strings/basic" , " strings/search" , " strings/util" ,
@@ -151,22 +154,25 @@ function choosetests(choices = [])
151
154
filter! (x -> (x != " Profile" ), tests)
152
155
end
153
156
154
- net_required_for = [" download" , " Sockets" , " LibGit2" , " LibCURL" , " Downloads" ,
155
- " Artifacts" , " LazyArtifacts" ]
157
+ net_required_for = [
158
+ " Artifacts" ,
159
+ " Downloads" ,
160
+ " LazyArtifacts" ,
161
+ " LibCURL" ,
162
+ " LibGit2" ,
163
+ " Sockets" ,
164
+ " download" ,
165
+ ]
156
166
net_on = true
157
167
try
158
168
ipa = getipaddr ()
159
- catch ex
160
- if force_net
161
- msg = " Networking is unavailable, and the `--force-net` option was passed"
162
- @error msg
169
+ catch
170
+ if ci_option_passed
171
+ @error (" Networking unavailable, but `--ci` was passed" )
163
172
rethrow ()
164
173
end
165
- @warn " Networking unavailable: Skipping tests [" * join (net_required_for, " , " ) * " ]"
166
174
net_on = false
167
- end
168
-
169
- if ! net_on
175
+ @warn " Networking unavailable: Skipping tests [" * join (net_required_for, " , " ) * " ]"
170
176
filter! (! in (net_required_for), tests)
171
177
end
172
178
@@ -194,8 +200,8 @@ function choosetests(choices = [])
194
200
filter! (x -> (x != " stdlib" && ! (x in STDLIBS)) , tests)
195
201
append! (tests, new_tests)
196
202
197
- requested_all || explicit_pkg || filter! (x -> x != " Pkg" , tests)
198
- requested_all || explicit_libgit2 || filter! (x -> x != " LibGit2/online" , tests)
203
+ requested_all || explicit_pkg || filter! (x -> x != " Pkg" , tests)
204
+ requested_all || explicit_libgit2_online || filter! (x -> x != " LibGit2/online" , tests)
199
205
200
206
# Filter out tests from the test groups in the stdlibs
201
207
filter! (! in (tests), unhandled)
0 commit comments