Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py

Issue 23496003: User interruption should still create results.html for run-webkit-tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed failing webkitpy tests and skipping printing of bot results in case of user interruption. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 self.assertRaises(KeyboardInterrupt, logging_run, ['failures/expected/ke yboard.html', '--child-processes', '1'], tests_included=True) 294 details, _, _ = logging_run(['failures/expected/keyboard.html', '--child -processes', '1'], tests_included=True)
295 self.assertEqual(details.exit_code, run_webkit_tests.INTERRUPTED_EXIT_ST ATUS)
295 296
296 if self.should_test_processes: 297 if self.should_test_processes:
297 self.assertRaises(KeyboardInterrupt, logging_run, 298 _, regular_output, _ = logging_run(['failures/expected/keyboard.html ', 'passes/text.html', '--child-processes', '2', '--skipped=ignore'], tests_incl uded=True, shared_port=False)
298 ['failures/expected/keyboard.html', 'passes/text.html', '--child -processes', '2', '--skipped=ignore'], tests_included=True, shared_port=False) 299 self.assertTrue(any(['Interrupted, exiting' in line for line in regu lar_output.buflist]))
299 300
300 def test_no_tests_found(self): 301 def test_no_tests_found(self):
301 details, err, _ = logging_run(['resources'], tests_included=True) 302 details, err, _ = logging_run(['resources'], tests_included=True)
302 self.assertEqual(details.exit_code, -1) 303 self.assertEqual(details.exit_code, -1)
303 self.assertContains(err, 'No tests to run.\n') 304 self.assertContains(err, 'No tests to run.\n')
304 305
305 def test_no_tests_found_2(self): 306 def test_no_tests_found_2(self):
306 details, err, _ = logging_run(['foo'], tests_included=True) 307 details, err, _ = logging_run(['foo'], tests_included=True)
307 self.assertEqual(details.exit_code, -1) 308 self.assertEqual(details.exit_code, -1)
308 self.assertContains(err, 'No tests to run.\n') 309 self.assertContains(err, 'No tests to run.\n')
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 967
967 run_webkit_tests.run = successful_run 968 run_webkit_tests.run = successful_run
968 res = run_webkit_tests.main(['--platform', 'test'], stdout, stderr) 969 res = run_webkit_tests.main(['--platform', 'test'], stdout, stderr)
969 self.assertEqual(res, -1) 970 self.assertEqual(res, -1)
970 971
971 run_webkit_tests.run = exception_raising_run 972 run_webkit_tests.run = exception_raising_run
972 res = run_webkit_tests.main([], stdout, stderr) 973 res = run_webkit_tests.main([], stdout, stderr)
973 self.assertEqual(res, run_webkit_tests.EXCEPTIONAL_EXIT_STATUS) 974 self.assertEqual(res, run_webkit_tests.EXCEPTIONAL_EXIT_STATUS)
974 finally: 975 finally:
975 run_webkit_tests.run = orig_run_fn 976 run_webkit_tests.run = orig_run_fn
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698