Title: [284637] trunk/Tools
Revision
284637
Author
[email protected]
Date
2021-10-21 13:17:08 -0700 (Thu, 21 Oct 2021)

Log Message

[Win Python] REGRESSION(r284398): run-api-tests: FileNotFoundError raised: [WinError 2] The system cannot find the file specified
https://bugs.webkit.org/show_bug.cgi?id=232037

Reviewed by Jonathan Bedard.

r284398 temporarily copied TestWTF program to ToBeListed to list
test cases. However, on Windows, TestWTF.exe is just a wrapper
program loading TestWTFLib.dll. If I just rename TestWTF.exe to
ToBeListed.exe, ToBeListed.exe tries to load ToBeListedLib.dll.

* Scripts/webkitpy/api_tests/manager.py:
(Manager._collect_tests): Do not copy the test program to
ToBeListed on Windows.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (284636 => 284637)


--- trunk/Tools/ChangeLog	2021-10-21 19:42:47 UTC (rev 284636)
+++ trunk/Tools/ChangeLog	2021-10-21 20:17:08 UTC (rev 284637)
@@ -1,3 +1,19 @@
+2021-10-21  Fujii Hironori  <[email protected]>
+
+        [Win Python] REGRESSION(r284398): run-api-tests: FileNotFoundError raised: [WinError 2] The system cannot find the file specified
+        https://bugs.webkit.org/show_bug.cgi?id=232037
+
+        Reviewed by Jonathan Bedard.
+
+        r284398 temporarily copied TestWTF program to ToBeListed to list
+        test cases. However, on Windows, TestWTF.exe is just a wrapper
+        program loading TestWTFLib.dll. If I just rename TestWTF.exe to
+        ToBeListed.exe, ToBeListed.exe tries to load ToBeListedLib.dll.
+
+        * Scripts/webkitpy/api_tests/manager.py:
+        (Manager._collect_tests): Do not copy the test program to
+        ToBeListed on Windows.
+
 2021-10-21  Devin Rousso  <[email protected]>
 
         [css-values-4] Support small (sv*), large (lv*) and dynamic (dv*) viewport units

Modified: trunk/Tools/Scripts/webkitpy/api_tests/manager.py (284636 => 284637)


--- trunk/Tools/Scripts/webkitpy/api_tests/manager.py	2021-10-21 19:42:47 UTC (rev 284636)
+++ trunk/Tools/Scripts/webkitpy/api_tests/manager.py	2021-10-21 20:17:08 UTC (rev 284637)
@@ -106,10 +106,12 @@
             if canonicalized_binary not in specified_binaries:
                 continue
 
-            to_be_listed = self.host.filesystem.join(self.host.filesystem.dirname(path), 'ToBeListed')
-            try:
+            to_be_listed = path
+            if not self._port.host.platform.is_win():
+                to_be_listed = self.host.filesystem.join(self.host.filesystem.dirname(path), 'ToBeListed')
                 self.host.filesystem.copyfile(path, to_be_listed)
                 self.host.filesystem.copymode(path, to_be_listed)
+            try:
                 output = self.host.executive.run_command(
                     Runner.command_for_port(self._port, [to_be_listed, '--gtest_list_tests']),
                     env=self._port.environment_for_api_tests())
@@ -118,7 +120,8 @@
                 _log.error('Failed to list {} tests'.format(canonicalized_binary))
                 raise
             finally:
-                self.host.filesystem.remove(to_be_listed)
+                if not self._port.host.platform.is_win():
+                    self.host.filesystem.remove(to_be_listed)
 
         if len(args) == 0:
             return sorted(available_tests)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to