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

Side by Side Diff: test/libplatform-unittests/testcfg.py

Issue 526043002: Refactor libplatform unit tests to use GTest/GMock. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Integrate into test driver. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « test/libplatform-unittests/libplatform-unittests.status ('k') | tools/presubmit.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 the V8 project authors. All rights reserved. 1 # Copyright 2014 the V8 project authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import shutil 6 import shutil
7 7
8 from testrunner.local import commands 8 from testrunner.local import commands
9 from testrunner.local import testsuite 9 from testrunner.local import testsuite
10 from testrunner.local import utils 10 from testrunner.local import utils
11 from testrunner.objects import testcase 11 from testrunner.objects import testcase
12 12
13 13
14 class CompilerUnitTestsSuite(testsuite.TestSuite): 14 class LibplatformUnitTestsSuite(testsuite.TestSuite):
15 def __init__(self, name, root): 15 def __init__(self, name, root):
16 super(CompilerUnitTestsSuite, self).__init__(name, root) 16 super(LibplatformUnitTestsSuite, self).__init__(name, root)
17 17
18 def ListTests(self, context): 18 def ListTests(self, context):
19 shell = os.path.abspath(os.path.join(context.shell_dir, self.shell())) 19 shell = os.path.abspath(os.path.join(context.shell_dir, self.shell()))
20 if utils.IsWindows(): 20 if utils.IsWindows():
21 shell += ".exe" 21 shell += ".exe"
22 output = commands.Execute(context.command_prefix + 22 output = commands.Execute(context.command_prefix +
23 [shell, "--gtest_list_tests"] + 23 [shell, "--gtest_list_tests"] +
24 context.extra_flags) 24 context.extra_flags)
25 if output.exit_code != 0: 25 if output.exit_code != 0:
26 print output.stdout 26 print output.stdout
(...skipping 11 matching lines...) Expand all
38 tests.sort() 38 tests.sort()
39 return tests 39 return tests
40 40
41 def GetFlagsForTestCase(self, testcase, context): 41 def GetFlagsForTestCase(self, testcase, context):
42 return (testcase.flags + ["--gtest_filter=" + testcase.path] + 42 return (testcase.flags + ["--gtest_filter=" + testcase.path] +
43 ["--gtest_random_seed=%s" % context.random_seed] + 43 ["--gtest_random_seed=%s" % context.random_seed] +
44 ["--gtest_print_time=0"] + 44 ["--gtest_print_time=0"] +
45 context.mode_flags) 45 context.mode_flags)
46 46
47 def shell(self): 47 def shell(self):
48 return "compiler-unittests" 48 return "libplatform-unittests"
49 49
50 50
51 def GetSuite(name, root): 51 def GetSuite(name, root):
52 return CompilerUnitTestsSuite(name, root) 52 return LibplatformUnitTestsSuite(name, root)
OLDNEW
« no previous file with comments | « test/libplatform-unittests/libplatform-unittests.status ('k') | tools/presubmit.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698