[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
dpranke at chromium.org
dpranke at chromium.org
Wed Dec 22 17:52:58 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 7fed1f8ff67a21d604898c126f8fddccfc62a064
Author: dpranke at chromium.org <dpranke at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 1 23:59:15 2010 +0000
2010-12-01 Dirk Pranke <dpranke at chromium.org>
Reviewed by Tony Chang.
new-run-webkit-tests: add a --dry-run / -n flag
https://bugs.webkit.org/show_bug.cgi?id=50045
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
* Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index f981dd4..0e8ea6e 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-01 Dirk Pranke <dpranke at chromium.org>
+
+ Reviewed by Tony Chang.
+
+ new-run-webkit-tests: add a --dry-run / -n flag
+ https://bugs.webkit.org/show_bug.cgi?id=50045
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
2010-12-01 Steve Falkenburg <sfalken at apple.com>
Reviewed by Adam Roben.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index 643e204..f4e92a6 100755
--- a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -599,20 +599,25 @@ class TestRunner:
message_broker = self._message_broker
self._current_filename_queue = filename_queue
self._current_result_summary = result_summary
- threads = message_broker.start_workers(self)
+
+ if not self._options.dry_run:
+ threads = message_broker.start_workers(self)
+ else:
+ threads = {}
self._printer.print_update("Starting testing ...")
keyboard_interrupted = False
- try:
- message_broker.run_message_loop()
- except KeyboardInterrupt:
- _log.info("Interrupted, exiting")
- message_broker.cancel_workers()
- keyboard_interrupted = True
- except:
- # Unexpected exception; don't try to clean up workers.
- _log.info("Exception raised, exiting")
- raise
+ if not self._options.dry_run:
+ try:
+ message_broker.run_message_loop()
+ except KeyboardInterrupt:
+ _log.info("Interrupted, exiting")
+ message_broker.cancel_workers()
+ keyboard_interrupted = True
+ except:
+ # Unexpected exception; don't try to clean up workers.
+ _log.info("Exception raised, exiting")
+ raise
thread_timings, test_timings, individual_test_timings = \
self._collect_timing_info(threads)
@@ -737,16 +742,18 @@ class TestRunner:
self._expectations, result_summary, retry_summary)
self._printer.print_unexpected_results(unexpected_results)
- if self._options.record_results:
+ if (self._options.record_results and not self._options.dry_run and
+ not keyboard_interrupted):
# Write the same data to log files and upload generated JSON files
# to appengine server.
self._upload_json_files(unexpected_results, result_summary,
individual_test_timings)
# Write the summary to disk (results.html) and display it if requested.
- wrote_results = self._write_results_html_file(result_summary)
- if self._options.show_results and wrote_results:
- self._show_results_html_file()
+ if not self._options.dry_run:
+ wrote_results = self._write_results_html_file(result_summary)
+ if self._options.show_results and wrote_results:
+ self._show_results_html_file()
# Now that we've completed all the processing we can, we re-raise
# a KeyboardInterrupt if necessary so the caller can handle it.
@@ -1520,6 +1527,9 @@ def parse_args(args=None):
optparse.make_option("--no-build", dest="build",
action="store_false", help="Don't check to see if the "
"DumpRenderTree build is up-to-date."),
+ optparse.make_option("-n", "--dry-run", action="store_true",
+ default=False,
+ help="Do everything but actually run the tests or upload results."),
# old-run-webkit-tests has --valgrind instead of wrapper.
optparse.make_option("--wrapper",
help="wrapper command to insert before invocations of "
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
index 20a4ac0..6bb741a 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
@@ -201,6 +201,13 @@ class MainTest(unittest.TestCase):
self.assertTrue('Running 2 DumpRenderTrees in parallel\n'
in regular_output.get())
+ def test_dryrun(self):
+ batch_tests_run = get_tests_run(['--dry-run'])
+ self.assertEqual(batch_tests_run, [])
+
+ batch_tests_run = get_tests_run(['-n'])
+ self.assertEqual(batch_tests_run, [])
+
def test_exception_raised(self):
self.assertRaises(ValueError, logging_run,
['failures/expected/exception.html'], tests_included=True)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list