summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
diff options
context:
space:
mode:
authorIain Merrick <husky@google.com>2010-09-13 16:35:48 +0100
committerIain Merrick <husky@google.com>2010-09-16 12:10:42 +0100
commit5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306 (patch)
treeddce1aa5e3b6967a69691892e500897558ff8ab6 /WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
parent12bec63ec71e46baba27f0bd9bd9d8067683690a (diff)
downloadexternal_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.zip
external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.gz
external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.bz2
Merge WebKit at r67178 : Initial merge by git.
Change-Id: I57e01163b6866cb029cdadf405a0394a3918bc18
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py')
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py50
1 files changed, 38 insertions, 12 deletions
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 4cbfdfc..aa96962 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
@@ -32,9 +32,9 @@
import codecs
import logging
import os
-import pdb
import Queue
import sys
+import tempfile
import thread
import time
import threading
@@ -59,7 +59,10 @@ def passing_run(args=[], port_obj=None, record_results=False,
new_args.extend(args)
if not tests_included:
# We use the glob to test that globbing works.
- new_args.extend(['passes', 'failures/expected/*'])
+ new_args.extend(['passes',
+ 'http/tests',
+ 'websocket/tests',
+ 'failures/expected/*'])
options, parsed_args = run_webkit_tests.parse_args(new_args)
if port_obj is None:
port_obj = port.get(options.platform, options)
@@ -71,10 +74,12 @@ def logging_run(args=[], tests_included=False):
new_args = ['--no-record-results']
if not '--platform' in args:
new_args.extend(['--platform', 'test'])
- if args:
- new_args.extend(args)
+ new_args.extend(args)
if not tests_included:
- new_args.extend(['passes', 'failures/expected/*'])
+ new_args.extend(['passes',
+ 'http/tests'
+ 'websocket/tests',
+ 'failures/expected/*'])
options, parsed_args = run_webkit_tests.parse_args(new_args)
port_obj = port.get(options.platform, options)
buildbot_output = array_stream.ArrayStream()
@@ -119,6 +124,14 @@ class MainTest(unittest.TestCase):
self.assertTrue(out.empty())
self.assertFalse(err.empty())
+ def test_hung_thread(self):
+ res, out, err = logging_run(['--run-singly', '--time-out-ms=50',
+ 'failures/expected/hang.html'],
+ tests_included=True)
+ self.assertEqual(res, 0)
+ self.assertFalse(out.empty())
+ self.assertFalse(err.empty())
+
def test_keyboard_interrupt(self):
# Note that this also tests running a test marked as SKIP if
# you specify it explicitly.
@@ -175,6 +188,19 @@ class MainTest(unittest.TestCase):
# FIXME: verify # of tests run
self.assertTrue(passing_run(['passes/text.html'], tests_included=True))
+ def test_test_list(self):
+ filename = tempfile.mktemp()
+ tmpfile = file(filename, mode='w+')
+ tmpfile.write('passes/text.html')
+ tmpfile.close()
+ self.assertTrue(passing_run(['--test-list=%s' % filename],
+ tests_included=True))
+ os.remove(filename)
+ res, out, err = logging_run(['--test-list=%s' % filename],
+ tests_included=True)
+ self.assertEqual(res, -1)
+ self.assertFalse(err.empty())
+
def test_unexpected_failures(self):
# Run tests including the unexpected failures.
res, out, err = logging_run(tests_included=True)
@@ -279,6 +305,13 @@ class DryrunTest(unittest.TestCase):
self.assertTrue(passing_run(['--platform', 'dryrun-mac',
'fast/html']))
+ def test_test(self):
+ res, out, err = logging_run(['--platform', 'dryrun-test',
+ '--pixel-tests'])
+ self.assertEqual(res, 2)
+ self.assertFalse(out.empty())
+ self.assertFalse(err.empty())
+
class TestThread(dump_render_tree_thread.WatchableThread):
def __init__(self, started_queue, stopping_queue):
@@ -388,13 +421,6 @@ class StandaloneFunctionsTest(unittest.TestCase):
self.assertFalse(child_thread.isAlive())
oc.restore_output()
- def test_find_thread_stack(self):
- id, stack = sys._current_frames().items()[0]
- found_stack = run_webkit_tests._find_thread_stack(id)
- self.assertNotEqual(found_stack, None)
-
- found_stack = run_webkit_tests._find_thread_stack(0)
- self.assertEqual(found_stack, None)
if __name__ == '__main__':
unittest.main()