@@ -18,7 +18,7 @@ def swiftpm_bin_path(swift_exec, swiftpm_args, env=None):
18
18
swiftpm_args = list (filter (lambda arg : arg != '-v' and arg != '--verbose' , swiftpm_args ))
19
19
cmd = [swift_exec , 'build' , '--show-bin-path' ] + swiftpm_args
20
20
print (' ' .join (cmd ))
21
- return subprocess .check_output (cmd , env = env ).strip ()
21
+ return subprocess .check_output (cmd , env = env , universal_newlines = True ).strip ()
22
22
23
23
def get_swiftpm_options (args ):
24
24
swiftpm_args = [
@@ -86,15 +86,6 @@ def delete_rpath(rpath, binary):
86
86
subprocess .check_call (cmd )
87
87
88
88
89
- def should_test_parallel ():
90
- if platform .system () == 'Linux' :
91
- distro = platform .linux_distribution ()
92
- if distro [0 ] != 'Ubuntu' :
93
- # Workaround hang in Process.run() that hasn't been tracked down yet.
94
- return False
95
- return True
96
-
97
-
98
89
def handle_invocation (swift_exec , args ):
99
90
swiftpm_args = get_swiftpm_options (args )
100
91
@@ -129,8 +120,10 @@ def handle_invocation(swift_exec, args):
129
120
print ('Cleaning ' + tests )
130
121
shutil .rmtree (tests , ignore_errors = True )
131
122
test_args = swiftpm_args
132
- if should_test_parallel ():
133
- test_args += ['--parallel' ]
123
+ # Running the tests concurrently doesn't work with glibc 2.24 because of a
124
+ # bug with posix_spawn called from Foundation, so it'll need to be disabled
125
+ # or fixed when used there, according to @benlangmuir.
126
+ test_args += ['--parallel' ]
134
127
swiftpm ('test' , swift_exec , test_args , env )
135
128
elif args .action == 'install' :
136
129
bin_path = swiftpm_bin_path (swift_exec , swiftpm_args , env )
0 commit comments