Title: [159868] trunk/Tools
- Revision
- 159868
- Author
- [email protected]
- Date
- 2013-11-29 03:41:02 -0800 (Fri, 29 Nov 2013)
Log Message
test-webkit-scripts should show the failing tests and use an appropriate exit code
https://bugs.webkit.org/show_bug.cgi?id=124840
Patch by Jozsef Berta <[email protected]> on 2013-11-29
Reviewed by Ryosuke Niwa.
A fixme in test-webkit-scripts asked that the script should display success or failiure
and exit with a 0 or 1 value accordingly after all of the tests have completed.
* Scripts/test-webkit-scripts:
(ScriptsTester.run_test_script):
The outcome of the currently run script is returned to the main as a boolean value. A boolean is returned,
because at this point we don't need to pass on more information other than success or failiure.
(ScriptsTester.main):
The return values are now stored for each script and when all tests have completed successfully,
the script indicates success and returns 0. Otherwise it will display the name(s) of the failing script(s) and return 1.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (159867 => 159868)
--- trunk/Tools/ChangeLog 2013-11-29 11:38:18 UTC (rev 159867)
+++ trunk/Tools/ChangeLog 2013-11-29 11:41:02 UTC (rev 159868)
@@ -1,3 +1,21 @@
+2013-11-29 Jozsef Berta <[email protected]>
+
+ test-webkit-scripts should show the failing tests and use an appropriate exit code
+ https://bugs.webkit.org/show_bug.cgi?id=124840
+
+ Reviewed by Ryosuke Niwa.
+
+ A fixme in test-webkit-scripts asked that the script should display success or failiure
+ and exit with a 0 or 1 value accordingly after all of the tests have completed.
+
+ * Scripts/test-webkit-scripts:
+ (ScriptsTester.run_test_script):
+ The outcome of the currently run script is returned to the main as a boolean value. A boolean is returned,
+ because at this point we don't need to pass on more information other than success or failiure.
+ (ScriptsTester.main):
+ The return values are now stored for each script and when all tests have completed successfully,
+ the script indicates success and returns 0. Otherwise it will display the name(s) of the failing script(s) and return 1.
+
2013-11-29 Krzysztof Czech <[email protected]>
[ATK] Added support for isAttributeSettable in AccessibilityUIElementAtk
Modified: trunk/Tools/Scripts/test-webkit-scripts (159867 => 159868)
--- trunk/Tools/Scripts/test-webkit-scripts 2013-11-29 11:38:18 UTC (rev 159867)
+++ trunk/Tools/Scripts/test-webkit-scripts 2013-11-29 11:41:02 UTC (rev 159868)
@@ -59,8 +59,9 @@
call_args = [script_path]
if args:
call_args.extend(args)
- subprocess.call(call_args)
+ return_code = subprocess.call(call_args)
print(70 * "*") # dividing line
+ return not bool(return_code)
def main(self):
parser = OptionParser(description=__doc__)
@@ -69,17 +70,25 @@
'including those suppressed by default')
(options, args) = parser.parse_args()
- self.run_test_script('Perl scripts', self.script_path('test-webkitperl'))
- self.run_test_script('Python scripts', self.script_path('test-webkitpy'),
+ webkitperl_success = self.run_test_script('Perl scripts', self.script_path('test-webkitperl'))
+ webkitpy_success = self.run_test_script('Python scripts', self.script_path('test-webkitpy'),
['--all'] if options.all else None)
- self.run_test_script('Ruby scripts', self.script_path('test-webkitruby'))
+ webkitruby_success = self.run_test_script('Ruby scripts', self.script_path('test-webkitruby'))
- # FIXME: Display a cumulative indication of success or failure.
- # In addition, call sys.exit() with 0 or 1 depending on that
- # cumulative success or failure.
- print('Note: Perl, Python, and Ruby results appear separately above.')
-
-
+ if webkitperl_success and webkitpy_success and webkitruby_success:
+ print('All tests completed successfully')
+ sys.exit(0)
+ else:
+ print('The following test scripts have failed: ')
+ if not webkitperl_success:
+ print('test-webkitperl')
+ if not webkitpy_success:
+ print('test-webkitpy')
+ if not webkitruby_success:
+ print('test-webkitruby')
+ print('Detailed results appear separately above.')
+ sys.exit(1)
+
if __name__ == '__main__':
# The scripts directory is the directory containing this file.
tester = ScriptsTester(os.path.dirname(__file__))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes