Closed Bug 1621187 Opened 5 years ago Closed 4 years ago

./mach jit-test no longer works on Windows

Categories

(Core :: JavaScript Engine, defect, P2)

Unspecified
Windows
defect

Tracking

()

RESOLVED DUPLICATE of bug 1633037

People

(Reporter: tcampbell, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Running ./mach jit-test no longer works on Windows local builds. I'm using the latest MozillaBuild 3.3 package.

$ ./mach jit-test box2d
Traceback (most recent call last):
  File "c:/Users/tcampbell/Projects/gecko.dev\js\src\jit-test\jit_test.py", line 27, in <module>
    from lib import jittests
  File "c:\Users\tcampbell\Projects\gecko.dev\build\mach_bootstrap.py", line 434, in __call__
    module = self._original_import(name, globals, locals, fromlist, level)
  File "c:\Users\tcampbell\Projects\gecko.dev\js\src\tests\lib\jittests.py", line 21, in <module>
    from .tasks_win import run_all_tests
  File "c:\Users\tcampbell\Projects\gecko.dev\build\mach_bootstrap.py", line 434, in __call__
    module = self._original_import(name, globals, locals, fromlist, level)
  File "c:\Users\tcampbell\Projects\gecko.dev\js\src\tests\lib\tasks_win.py", line 11, in <module>
    from Queue import Queue, Empty
  File "c:\Users\tcampbell\Projects\gecko.dev\build\mach_bootstrap.py", line 434, in __call__
    module = self._original_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'Queue'

Something along the lines of the following seems to work..

diff --git a/js/src/tests/lib/tasks_win.py b/js/src/tests/lib/tasks_win.py
index e8ef467b4a30..2d9d051f4c90 100644
--- a/js/src/tests/lib/tasks_win.py
+++ b/js/src/tests/lib/tasks_win.py
@@ -4,11 +4,10 @@
 from __future__ import print_function, unicode_literals, division

 import subprocess
-import sys

 from datetime import datetime, timedelta
 from threading import Thread
-from Queue import Queue, Empty
+from queue import Queue, Empty

 from .progressbar import ProgressBar
 from .results import NullTestOutput, TestOutput, escape_cmdline
@@ -24,7 +23,7 @@ class TaskFinishedMarker:

 def _do_work(qTasks, qResults, qWatch, prefix, run_skipped, timeout, show_cmd):
     while True:
-        test = qTasks.get(block=True, timeout=sys.maxint)
+        test = qTasks.get(block=True, timeout=None)
         if test is EndMarker:
             qWatch.put(EndMarker)
             qResults.put(EndMarker)
@@ -50,6 +49,9 @@ def _do_work(qTasks, qResults, qWatch, prefix, run_skipped, timeout, show_cmd):
         out, err = proc.communicate()
         qWatch.put(TaskFinishedMarker)

+        out = out.decode()
+        err = err.decode()
+
         # Create a result record and forward to result processing.
         dt = datetime.now() - tStart
         result = TestOutput(test, cmd, out, err, proc.returncode, dt.total_seconds(),
@@ -75,7 +77,7 @@ def _do_watch(qWatch, timeout):
                 # ignore this.
                 if ex.winerror != 5:
                     raise
-            fin = qWatch.get(block=True, timeout=sys.maxint)
+            fin = qWatch.get(block=True, timeout=None)
             assert fin is TaskFinishedMarker, "invalid finish marker"
Priority: -- → P2

This patch looks like the one in bug 1633037. I bet this is fixed. Reopen if not.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.