| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 def test_single_skipped_file(self): | 460 def test_single_skipped_file(self): |
| 461 tests_run = get_tests_run(['failures/expected/keybaord.html']) | 461 tests_run = get_tests_run(['failures/expected/keybaord.html']) |
| 462 self.assertEqual([], tests_run) | 462 self.assertEqual([], tests_run) |
| 463 | 463 |
| 464 def test_stderr_is_saved(self): | 464 def test_stderr_is_saved(self): |
| 465 host = MockHost() | 465 host = MockHost() |
| 466 self.assertTrue(passing_run(host=host)) | 466 self.assertTrue(passing_run(host=host)) |
| 467 self.assertEqual(host.filesystem.read_text_file('/tmp/layout-test-result
s/passes/error-stderr.txt'), | 467 self.assertEqual(host.filesystem.read_text_file('/tmp/layout-test-result
s/passes/error-stderr.txt'), |
| 468 'stuff going to stderr') | 468 'stuff going to stderr') |
| 469 | 469 |
| 470 def test_reftest_crash_log_is_saved(self): | |
| 471 host = MockHost() | |
| 472 self.assertTrue(logging_run(['failures/unexpected/crash-reftest.html'],
tests_included=True, host=host)) | |
| 473 self.assertEqual(host.filesystem.read_text_file('/tmp/layout-test-result
s/failures/unexpected/crash-reftest-crash-log.txt'), | |
| 474 'reftest crash log') | |
| 475 | |
| 476 def test_test_list(self): | 470 def test_test_list(self): |
| 477 host = MockHost() | 471 host = MockHost() |
| 478 filename = '/tmp/foo.txt' | 472 filename = '/tmp/foo.txt' |
| 479 host.filesystem.write_text_file(filename, 'passes/text.html') | 473 host.filesystem.write_text_file(filename, 'passes/text.html') |
| 480 tests_run = get_tests_run(['--test-list=%s' % filename], host=host) | 474 tests_run = get_tests_run(['--test-list=%s' % filename], host=host) |
| 481 self.assertEqual(['passes/text.html'], tests_run) | 475 self.assertEqual(['passes/text.html'], tests_run) |
| 482 host.filesystem.remove(filename) | 476 host.filesystem.remove(filename) |
| 483 details, err, user = logging_run(['--test-list=%s' % filename], tests_in
cluded=True, host=host) | 477 details, err, user = logging_run(['--test-list=%s' % filename], tests_in
cluded=True, host=host) |
| 484 self.assertEqual(details.exit_code, test_run_results.NO_TESTS_EXIT_STATU
S) | 478 self.assertEqual(details.exit_code, test_run_results.NO_TESTS_EXIT_STATU
S) |
| 485 self.assertNotEmpty(err) | 479 self.assertNotEmpty(err) |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 stderr = StringIO.StringIO() | 1074 stderr = StringIO.StringIO() |
| 1081 res = run_webkit_tests.main(['--platform', 'test', '--exit-after-n-failu
res', '1', | 1075 res = run_webkit_tests.main(['--platform', 'test', '--exit-after-n-failu
res', '1', |
| 1082 'failures/unexpected/missing_text.html', | 1076 'failures/unexpected/missing_text.html', |
| 1083 'failures/unexpected/missing_image.html'], | 1077 'failures/unexpected/missing_image.html'], |
| 1084 stdout, stderr) | 1078 stdout, stderr) |
| 1085 self.assertEqual(res, test_run_results.EARLY_EXIT_STATUS) | 1079 self.assertEqual(res, test_run_results.EARLY_EXIT_STATUS) |
| 1086 self.assertEqual(stdout.getvalue(), | 1080 self.assertEqual(stdout.getvalue(), |
| 1087 ('\n' | 1081 ('\n' |
| 1088 'Regressions: Unexpected missing results (1)\n' | 1082 'Regressions: Unexpected missing results (1)\n' |
| 1089 ' failures/unexpected/missing_image.html [ Missing ]\n\n')) | 1083 ' failures/unexpected/missing_image.html [ Missing ]\n\n')) |
| OLD | NEW |