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

Side by Side Diff: googletest/tests/run_test_cases_test.py

Issue 19917006: Move all googletest related scripts into googletest/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Remove unnecessary pylint warning disable Created 7 years, 5 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 | Annotate | Revision Log
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 shutil 8 import shutil
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 continue 358 continue
359 print >> sys.stderr, 'Failure at index %d' % i 359 print >> sys.stderr, 'Failure at index %d' % i
360 raise 360 raise
361 361
362 def test_gtest_filter(self): 362 def test_gtest_filter(self):
363 old = run_test_cases.run_test_cases 363 old = run_test_cases.run_test_cases
364 exe = os.path.join(ROOT_DIR, 'tests', 'gtest_fake', 'gtest_fake_pass.py') 364 exe = os.path.join(ROOT_DIR, 'tests', 'gtest_fake', 'gtest_fake_pass.py')
365 def expect( 365 def expect(
366 executable, cwd, test_cases, jobs, timeout, clusters, retries, 366 executable, cwd, test_cases, jobs, timeout, clusters, retries,
367 run_all, max_failures, no_cr, gtest_output, result_file, verbose): 367 run_all, max_failures, no_cr, gtest_output, result_file, verbose):
368 self.assertEqual(run_test_cases.fix_python_path([exe]), executable) 368 self.assertEqual(
369 run_test_cases.run_isolated.fix_python_path([exe]), executable)
369 self.assertEqual(os.getcwd(), cwd) 370 self.assertEqual(os.getcwd(), cwd)
370 # They are in reverse order due to test shuffling. 371 # They are in reverse order due to test shuffling.
371 self.assertEqual(['Foo.Bar1', 'Foo.Bar/3'], test_cases) 372 self.assertEqual(['Foo.Bar1', 'Foo.Bar/3'], test_cases)
372 self.assertEqual(run_test_cases.run_isolated.num_processors(), jobs) 373 self.assertEqual(run_test_cases.run_isolated.num_processors(), jobs)
373 self.assertEqual(75, timeout) 374 self.assertEqual(75, timeout)
374 self.assertEqual(None, clusters) 375 self.assertEqual(None, clusters)
375 self.assertEqual(2, retries) 376 self.assertEqual(2, retries)
376 self.assertEqual(None, run_all) 377 self.assertEqual(None, run_all)
377 self.assertEqual(None, no_cr) 378 self.assertEqual(None, no_cr)
378 self.assertEqual('', gtest_output) 379 self.assertEqual('', gtest_output)
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 self.fail() 872 self.fail()
872 except FearsomeException: 873 except FearsomeException:
873 self.assertEqual(True, task_added) 874 self.assertEqual(True, task_added)
874 875
875 876
876 if __name__ == '__main__': 877 if __name__ == '__main__':
877 VERBOSE = '-v' in sys.argv 878 VERBOSE = '-v' in sys.argv
878 logging.basicConfig(level=logging.DEBUG if VERBOSE else logging.ERROR) 879 logging.basicConfig(level=logging.DEBUG if VERBOSE else logging.ERROR)
879 unittest.TestCase.maxDiff = 5000 880 unittest.TestCase.maxDiff = 5000
880 unittest.main() 881 unittest.main()
OLDNEW
« no previous file with comments | « googletest/tests/run_test_cases_smoke_test.py ('k') | googletest/tests/trace_test_cases_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698