OLD | NEW |
---|---|
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged | 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged |
3 # Copyright (C) 2011 Apple Inc. All rights reserved. | 3 # Copyright (C) 2011 Apple Inc. All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
284 | 284 |
285 def test_full_results_html(self): | 285 def test_full_results_html(self): |
286 host = MockHost() | 286 host = MockHost() |
287 details, _, _ = logging_run(['--full-results-html'], host=host) | 287 details, _, _ = logging_run(['--full-results-html'], host=host) |
288 self.assertEqual(details.exit_code, 0) | 288 self.assertEqual(details.exit_code, 0) |
289 self.assertEqual(len(host.user.opened_urls), 1) | 289 self.assertEqual(len(host.user.opened_urls), 1) |
290 | 290 |
291 def test_keyboard_interrupt(self): | 291 def test_keyboard_interrupt(self): |
292 # Note that this also tests running a test marked as SKIP if | 292 # Note that this also tests running a test marked as SKIP if |
293 # you specify it explicitly. | 293 # you specify it explicitly. |
294 #host = MockHost() | |
295 #details, _, _ = logging_run(['failures/expected/keyboard.html', '--chil d-processes', '1'], tests_included=True, host=host) | |
296 #self.assertEqual(details.exit_code, run_webkit_tests.INTERRUPTED_EXIT_S TATUS) | |
Dirk Pranke
2013/08/29 17:04:26
I'm not quite sure what your intent w/ these chang
| |
294 self.assertRaises(KeyboardInterrupt, logging_run, ['failures/expected/ke yboard.html', '--child-processes', '1'], tests_included=True) | 297 self.assertRaises(KeyboardInterrupt, logging_run, ['failures/expected/ke yboard.html', '--child-processes', '1'], tests_included=True) |
295 | 298 |
296 if self.should_test_processes: | 299 if self.should_test_processes: |
297 self.assertRaises(KeyboardInterrupt, logging_run, | 300 self.assertRaises(KeyboardInterrupt, logging_run, |
298 ['failures/expected/keyboard.html', 'passes/text.html', '--child -processes', '2', '--skipped=ignore'], tests_included=True, shared_port=False) | 301 ['failures/expected/keyboard.html', 'passes/text.html', '--child -processes', '2', '--skipped=ignore'], tests_included=True, shared_port=False) |
302 #_, regular_output, _ = logging_run(['failures/expected/keyboard.htm l', 'passes/text.html', '--child-processes', '2', '--skipped=ignore'], tests_inc luded=True, shared_port=False) | |
303 #self.assertTrue(any(['Running 1 ' in line for line in regular_outpu t.buflist])) | |
299 | 304 |
300 def test_no_tests_found(self): | 305 def test_no_tests_found(self): |
301 details, err, _ = logging_run(['resources'], tests_included=True) | 306 details, err, _ = logging_run(['resources'], tests_included=True) |
302 self.assertEqual(details.exit_code, -1) | 307 self.assertEqual(details.exit_code, -1) |
303 self.assertContains(err, 'No tests to run.\n') | 308 self.assertContains(err, 'No tests to run.\n') |
304 | 309 |
305 def test_no_tests_found_2(self): | 310 def test_no_tests_found_2(self): |
306 details, err, _ = logging_run(['foo'], tests_included=True) | 311 details, err, _ = logging_run(['foo'], tests_included=True) |
307 self.assertEqual(details.exit_code, -1) | 312 self.assertEqual(details.exit_code, -1) |
308 self.assertContains(err, 'No tests to run.\n') | 313 self.assertContains(err, 'No tests to run.\n') |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
966 | 971 |
967 run_webkit_tests.run = successful_run | 972 run_webkit_tests.run = successful_run |
968 res = run_webkit_tests.main(['--platform', 'test'], stdout, stderr) | 973 res = run_webkit_tests.main(['--platform', 'test'], stdout, stderr) |
969 self.assertEqual(res, -1) | 974 self.assertEqual(res, -1) |
970 | 975 |
971 run_webkit_tests.run = exception_raising_run | 976 run_webkit_tests.run = exception_raising_run |
972 res = run_webkit_tests.main([], stdout, stderr) | 977 res = run_webkit_tests.main([], stdout, stderr) |
973 self.assertEqual(res, run_webkit_tests.EXCEPTIONAL_EXIT_STATUS) | 978 self.assertEqual(res, run_webkit_tests.EXCEPTIONAL_EXIT_STATUS) |
974 finally: | 979 finally: |
975 run_webkit_tests.run = orig_run_fn | 980 run_webkit_tests.run = orig_run_fn |
OLD | NEW |