summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/webkitpy/layout_tests
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-01-05 12:15:11 +0000
committerSteve Block <steveblock@google.com>2011-01-06 14:14:00 +0000
commitd06194330da2bb8da887d2e1adeacb3a5c1504b2 (patch)
treee0af8413af65a8e30630563441af7bdb8478e513 /WebKitTools/Scripts/webkitpy/layout_tests
parent419a5cf2f8db6ca014df624865197ffb82caad37 (diff)
downloadexternal_webkit-d06194330da2bb8da887d2e1adeacb3a5c1504b2.zip
external_webkit-d06194330da2bb8da887d2e1adeacb3a5c1504b2.tar.gz
external_webkit-d06194330da2bb8da887d2e1adeacb3a5c1504b2.tar.bz2
Merge WebKit at r72805: Initial merge by Git
Note that this is a backwards merge from Chromium release 9.0.600.0 to 9.0.597.0, to align with the Chromium 9 stable release branch. Change-Id: I5d2bb4e8cee9d39ae8485abf48bdb55ecf8b3790
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/layout_tests')
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/port/base.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/port/config.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/port/config_unittest.py1
-rwxr-xr-xWebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py40
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py7
5 files changed, 17 insertions, 35 deletions
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
index bc5a9aa..757318d 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
@@ -492,7 +492,7 @@ class Port(object):
"""Relative unix-style path for a filename under the LayoutTests
directory. Filenames outside the LayoutTests directory should raise
an error."""
- assert filename.startswith(self.layout_tests_dir()), "%s did not start with %s" % (filename, self.layout_tests_dir())
+ #assert(filename.startswith(self.layout_tests_dir()))
return filename[len(self.layout_tests_dir()) + 1:]
def results_directory(self):
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/config.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/config.py
index 88f1146..9aec637 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/config.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/config.py
@@ -132,7 +132,7 @@ class Config(object):
# This code will also work if there is no SCM system at all.
if not self._webkit_base_dir:
abspath = os.path.abspath(__file__)
- self._webkit_base_dir = abspath[0:abspath.find('WebKitTools') - 1]
+ self._webkit_base_dir = abspath[0:abspath.find('WebKitTools')]
return self._webkit_base_dir
def _script_path(self, script_name):
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/config_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/config_unittest.py
index 8ec28fc..2d23691 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/config_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/config_unittest.py
@@ -186,7 +186,6 @@ class ConfigTest(unittest.TestCase):
c = config.Config(executive.Executive(), filesystem.FileSystem())
base_dir = c.webkit_base_dir()
self.assertTrue(base_dir)
- self.assertNotEqual(base_dir[-1], '/')
orig_cwd = os.getcwd()
os.chdir(os.environ['HOME'])
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index f4e92a6..643e204 100755
--- a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -599,25 +599,20 @@ class TestRunner:
message_broker = self._message_broker
self._current_filename_queue = filename_queue
self._current_result_summary = result_summary
-
- if not self._options.dry_run:
- threads = message_broker.start_workers(self)
- else:
- threads = {}
+ threads = message_broker.start_workers(self)
self._printer.print_update("Starting testing ...")
keyboard_interrupted = False
- 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
+ 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)
@@ -742,18 +737,16 @@ class TestRunner:
self._expectations, result_summary, retry_summary)
self._printer.print_unexpected_results(unexpected_results)
- if (self._options.record_results and not self._options.dry_run and
- not keyboard_interrupted):
+ if self._options.record_results:
# 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.
- 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()
+ 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.
@@ -1527,9 +1520,6 @@ 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 6bb741a..20a4ac0 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
@@ -201,13 +201,6 @@ 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)