summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMike Pennisi <mike@mikepennisi.com>2016-02-10 17:15:49 -0500
committerMike Pennisi <mike@mikepennisi.com>2016-02-10 17:15:49 -0500
commitb791cc4fbec459b2eef502502e44a3d00688e083 (patch)
tree3648a8b645d472d54ab2b01432c6f1356bc1f9b0 /tools
parent217812891cd63c20b25379b2cf73f3101416ffe4 (diff)
downloadqtdeclarative-testsuites-b791cc4fbec459b2eef502502e44a3d00688e083.tar.gz
Runner: Re-use lock to share access to stdout
When executing multiple tests in parallel, each "child" thread would write to the process's standard output buffer immediately upon test completion. Because thread execution order and instruction interleaving is non-deterministic, this made it possible for characters to be emitted out-of-order. When extended to support multiple concurrent threads, the runner was outfitted with a "log lock" dedicated to sharing access to the output file (when applicable). Re-use this lock when writing to standard out, ensuring proper ordering of test result messages.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/packaging/test262.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/packaging/test262.py b/tools/packaging/test262.py
index 26f3f8b52..735d796ca 100755
--- a/tools/packaging/test262.py
+++ b/tools/packaging/test262.py
@@ -606,10 +606,11 @@ class TestSuite(object):
if logname:
self.WriteLog(result)
finally:
+ progress.HasRun(result)
+
if workers_count > 1:
log_lock.release()
- progress.HasRun(result)
if workers_count == 1:
exec_case()
else: