Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 committed Aug 19, 2021
1 parent ff75baa commit eb362e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions tests/parallel_testsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@
import tempfile
import time
import queue
import common
import os

from tools.tempfiles import try_delete

NUM_CORES = None


def g_testing_thread(work_queue, result_queue, temp_dir):
print(common.EMTEST_LACKS_NATIVE_CLANG)
print("IN PROC")
for key, value in os.environ.items():
if key.startswith("EM"):
print("%s: %s" % (key,value))
for test in iter(lambda: get_from_queue(work_queue), None):
result = BufferedParallelTestResult()
test.set_temp_dir(temp_dir)
Expand Down Expand Up @@ -77,6 +84,7 @@ def reversed_tests(self):
def init_processes(self, test_queue):
use_cores = min(self.max_cores, num_cores())
print('Using %s parallel test processes' % use_cores)
print(os.environ['EMTEST_LACKS_NATIVE_CLANG'])
self.processes = []
self.result_queue = multiprocessing.Queue()
self.dedicated_temp_dirs = [tempfile.mkdtemp() for x in range(use_cores)]
Expand Down
5 changes: 3 additions & 2 deletions tests/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ def suite_for_module(module, tests):
if not common.EMTEST_SAVE_DIR and not shared.DEBUG:
has_multiple_tests = len(tests) > 1
has_multiple_cores = parallel_testsuite.num_cores() > 1
if suite_supported and has_multiple_tests and has_multiple_cores:
return parallel_testsuite.ParallelTestSuite(len(tests))
#if suite_supported and has_multiple_tests and has_multiple_cores:
return parallel_testsuite.ParallelTestSuite(len(tests))
return unittest.TestSuite()


Expand Down Expand Up @@ -393,6 +393,7 @@ def prepend_default(arg):
configure()

if __name__ == '__main__':
print('main: ' + os.environ['EMTEST_LACKS_NATIVE_CLANG'])
try:
sys.exit(main(sys.argv))
except KeyboardInterrupt:
Expand Down

0 comments on commit eb362e5

Please sign in to comment.