@@ -28,11 +28,10 @@ const TESTNAMES = [
2828        " boundscheck" " error" " ambiguous" " cartesian" " osutils" 
2929        " channels" " iostream" " secretbuffer" " specificity" 
3030        " reinterpretarray" " syntax" " corelogging" " missing" " asyncmap" 
31-         " smallarrayshrink" " opaque_closure" " filesystem" " download" 
31+         " smallarrayshrink" " opaque_closure" " filesystem" " download" , 
3232]
3333
3434""" 
35- 
3635`(; tests, net_on, exit_on_error, seed) = choosetests(choices)` selects a set of tests to be 
3736run. `choices` should be a vector of test names; if empty or set to 
3837`["all"]`, all tests are selected. 
@@ -65,7 +64,7 @@ function choosetests(choices = [])
6564    exit_on_error =  false 
6665    use_revise =  false 
6766    seed =  rand (RandomDevice (), UInt128)
68-     force_net  =  false 
67+     ci_option_passed  =  false 
6968    dryrun =  false 
7069
7170    for  (i, t) in  enumerate (choices)
@@ -77,9 +76,9 @@ function choosetests(choices = [])
7776        elseif  t ==  " --revise" 
7877            use_revise =  true 
7978        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 
8382        elseif  t ==  " --help-list" 
8483            dryrun =  true 
8584        elseif  t ==  " --help" 
@@ -98,7 +97,11 @@ function choosetests(choices = [])
9897
9998                  Or prefix a name with `-` (such as `-core`) to skip a particular test. 
10099                """  )
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 ))
102105        elseif  startswith (t, " --" 
103106            error (" unknown option: $t " 
104107        elseif  startswith (t, " -" 
@@ -129,8 +132,8 @@ function choosetests(choices = [])
129132       end 
130133    end 
131134
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
134137
135138    filtertests! (tests, " unicode" " unicode/utf8" 
136139    filtertests! (tests, " strings" " strings/basic" " strings/search" " strings/util" 
@@ -151,22 +154,25 @@ function choosetests(choices = [])
151154        filter! (x ->  (x !=  " Profile" 
152155    end 
153156
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+     ]
156166    net_on =  true 
157167    try 
158168        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" 
163172            rethrow ()
164173        end 
165-         @warn  " Networking unavailable: Skipping tests [" *  join (net_required_for, " , " *  " ]" 
166174        net_on =  false 
167-     end 
168- 
169-     if  ! net_on
175+         @warn  " Networking unavailable: Skipping tests [" *  join (net_required_for, " , " *  " ]" 
170176        filter! (! in (net_required_for), tests)
171177    end 
172178
@@ -194,8 +200,8 @@ function choosetests(choices = [])
194200    filter! (x ->  (x !=  " stdlib" &&  ! (x in  STDLIBS)) , tests)
195201    append! (tests, new_tests)
196202
197-     requested_all ||  explicit_pkg     ||  filter! (x ->  x !=  " Pkg" 
198-     requested_all ||  explicit_libgit2  ||  filter! (x ->  x !=  " LibGit2/online" 
203+     requested_all ||  explicit_pkg             ||  filter! (x ->  x !=  " Pkg" 
204+     requested_all ||  explicit_libgit2_online  ||  filter! (x ->  x !=  " LibGit2/online" 
199205
200206    #  Filter out tests from the test groups in the stdlibs
201207    filter! (! in (tests), unhandled)
0 commit comments