|
@@ -11,6 +11,7 @@ import subprocess
|
|
|
import signal
|
|
|
|
|
|
username = "test_user"
|
|
|
+parallel_push = True
|
|
|
|
|
|
def serialize(value):
|
|
|
if isinstance(value, str):
|
|
@@ -87,6 +88,7 @@ def run_file(files, parameters, expected, mode):
|
|
|
# Run Modelverse server
|
|
|
proc = execute("run_local_modelverse", ["bootstrap/bootstrap.m"], wait=False)
|
|
|
|
|
|
+ threads = []
|
|
|
for filename in files:
|
|
|
if filename == "--fast":
|
|
|
continue
|
|
@@ -98,7 +100,16 @@ def run_file(files, parameters, expected, mode):
|
|
|
raise Exception("File not found: %s" % filename)
|
|
|
print("Found file " + str(mod_filename))
|
|
|
|
|
|
- compile_file(mod_filename, filename, mode, proc)
|
|
|
+ if parallel_push:
|
|
|
+ import threading
|
|
|
+ threads.append(threading.Thread(target=compile_file, args=[mod_filename, filename, mode, proc]))
|
|
|
+ threads[-1].start()
|
|
|
+ else:
|
|
|
+ compile_file(mod_filename, filename, mode, proc)
|
|
|
+
|
|
|
+ if parallel_push:
|
|
|
+ for t in threads:
|
|
|
+ t.join()
|
|
|
|
|
|
if mode[-1] == "O":
|
|
|
# Fire up the linker
|