Title: [229712] trunk
Revision
229712
Author
dba...@webkit.org
Date
2018-03-19 14:12:17 -0700 (Mon, 19 Mar 2018)

Log Message

test-webkitpy no longer runs WebKit2 tests
https://bugs.webkit.org/show_bug.cgi?id=183724

Reviewed by Alexey Proskuryakov.

Source/WebKit:

Fixes an issue where Python emits errors "global name reset_results is not defined" when
running tests in messages_unittest.py using test-webkitpy.

Currently messages_unittest.py conditionally defines the global variable reset_results
when run as the main program (i.e. __name__ == "__main__"). When messages_unittest.py is
imported as a module as test-webkitpy does then it is not considered the main program
;=> the top-level script environment is not __main__ ;=> we do not define the global
variable reset_results. Instead we should unconditionally define the global variable
reset_results.

* Scripts/webkit/messages_unittest.py:

Tools:

The WebKit2 tests have seen been moved from Source/WebKit2/Scripts/webkit2 to Source/WebKit/Scripts/webkit.

* Scripts/webkitpy/test/main.py:
(main):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (229711 => 229712)


--- trunk/Source/WebKit/ChangeLog	2018-03-19 20:49:03 UTC (rev 229711)
+++ trunk/Source/WebKit/ChangeLog	2018-03-19 21:12:17 UTC (rev 229712)
@@ -1,3 +1,22 @@
+2018-03-19  Daniel Bates  <daba...@apple.com>
+
+        test-webkitpy no longer runs WebKit2 tests
+        https://bugs.webkit.org/show_bug.cgi?id=183724
+
+        Reviewed by Alexey Proskuryakov.
+
+        Fixes an issue where Python emits errors "global name reset_results is not defined" when
+        running tests in messages_unittest.py using test-webkitpy.
+
+        Currently messages_unittest.py conditionally defines the global variable reset_results
+        when run as the main program (i.e. __name__ == "__main__"). When messages_unittest.py is
+        imported as a module as test-webkitpy does then it is not considered the main program
+        ;=> the top-level script environment is not __main__ ;=> we do not define the global
+        variable reset_results. Instead we should unconditionally define the global variable
+        reset_results.
+
+        * Scripts/webkit/messages_unittest.py:
+
 2018-03-19  Per Arne Vollan  <pvol...@apple.com>
 
         When the WebContent process is blocked from accessing the WindowServer, the call CVDisplayLinkCreateWithCGDisplay will fail.

Modified: trunk/Source/WebKit/Scripts/webkit/messages_unittest.py (229711 => 229712)


--- trunk/Source/WebKit/Scripts/webkit/messages_unittest.py	2018-03-19 20:49:03 UTC (rev 229711)
+++ trunk/Source/WebKit/Scripts/webkit/messages_unittest.py	2018-03-19 21:12:17 UTC (rev 229712)
@@ -32,6 +32,8 @@
 
 script_directory = os.path.dirname(os.path.realpath(__file__))
 
+reset_results = False
+
 with open(os.path.join(script_directory, 'test-messages.in')) as in_file:
     _messages_file_contents = in_file.read()
 
@@ -383,7 +385,6 @@
 
 
 if __name__ == '__main__':
-    reset_results = False
     add_reset_results_to_unittest_help()
     parse_sys_argv()
     unittest.main()

Modified: trunk/Tools/ChangeLog (229711 => 229712)


--- trunk/Tools/ChangeLog	2018-03-19 20:49:03 UTC (rev 229711)
+++ trunk/Tools/ChangeLog	2018-03-19 21:12:17 UTC (rev 229712)
@@ -1,5 +1,17 @@
 2018-03-19  Daniel Bates  <daba...@apple.com>
 
+        test-webkitpy no longer runs WebKit2 tests
+        https://bugs.webkit.org/show_bug.cgi?id=183724
+
+        Reviewed by Alexey Proskuryakov.
+
+        The WebKit2 tests have seen been moved from Source/WebKit2/Scripts/webkit2 to Source/WebKit/Scripts/webkit.
+
+        * Scripts/webkitpy/test/main.py:
+        (main):
+
+2018-03-19  Daniel Bates  <daba...@apple.com>
+
         Make run-webkit-app work for non-GUI apps
         https://bugs.webkit.org/show_bug.cgi?id=183701
 

Modified: trunk/Tools/Scripts/webkitpy/test/main.py (229711 => 229712)


--- trunk/Tools/Scripts/webkitpy/test/main.py	2018-03-19 20:49:03 UTC (rev 229711)
+++ trunk/Tools/Scripts/webkitpy/test/main.py	2018-03-19 21:12:17 UTC (rev 229712)
@@ -53,7 +53,7 @@
 
     # There is no WebKit2 on Windows, so we don't need to run WebKit2 unittests on it.
     if not (sys.platform.startswith('win') or sys.platform == 'cygwin'):
-        tester.add_tree(os.path.join(webkit_root, 'Source', 'WebKit2', 'Scripts'), 'webkit2')
+        tester.add_tree(os.path.join(webkit_root, 'Source', 'WebKit', 'Scripts'), 'webkit')
 
     tester.skip(('webkitpy.common.checkout.scm.scm_unittest',), 'are really, really, slow', 31818)
     if sys.platform.startswith('win'):
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to