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

Side by Side Diff: tools/isolate/run_test_cases_smoke_test.py

Issue 10826306: Get run_test_cases.py to fail if it fails to get the list of tests it should run. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
« no previous file with comments | « tools/isolate/run_test_cases.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import logging 6 import logging
7 import os 7 import os
8 import re 8 import re
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 re.escape(l) for l in gtest_fake_base.get_footer(1, 1).splitlines() 92 re.escape(l) for l in gtest_fake_base.get_footer(1, 1).splitlines()
93 ] + [ 93 ] + [
94 '', 94 '',
95 re.escape('Success: 3 75.00%'), 95 re.escape('Success: 3 75.00%'),
96 re.escape('Flaky: 0 0.00%'), 96 re.escape('Flaky: 0 0.00%'),
97 re.escape('Fail: 1 25.00%'), 97 re.escape('Fail: 1 25.00%'),
98 r'\d+\.\ds Done running 4 tests with 6 executions. \d+\.\d test/s', 98 r'\d+\.\ds Done running 4 tests with 6 executions. \d+\.\d test/s',
99 ] 99 ]
100 self._check_results(expected_out_re, out, err) 100 self._check_results(expected_out_re, out, err)
101 101
102 def test_simple_gtest_list_error(self):
103 out, err, return_code = RunTest('gtest_fake_error.py')
104
105 expected_out_re = [
106 'Failed to run .+gtest_fake_error.py',
107 'Unable to list tests'
108 ]
109
110 self.assertEqual(1, return_code)
111 self._check_results(expected_out_re, out, err)
112
102 113
103 if __name__ == '__main__': 114 if __name__ == '__main__':
104 VERBOSE = '-v' in sys.argv 115 VERBOSE = '-v' in sys.argv
105 logging.basicConfig(level=logging.DEBUG if VERBOSE else logging.ERROR) 116 logging.basicConfig(level=logging.DEBUG if VERBOSE else logging.ERROR)
106 unittest.main() 117 unittest.main()
OLDNEW
« no previous file with comments | « tools/isolate/run_test_cases.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698