Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Refactoring: Make gtest testsuite the default."
This reverts commit cb8f08658767e7e3182e5deab0473f264f6ce92f. TBR=bmeurer@chromium.org Review URL: https://codereview.chromium.org/532673002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
- Loading branch information
machenbach@chromium.org
committed
Sep 2, 2014
1 parent
47aaecc
commit dd1f99f
Showing
9 changed files
with
1,051 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright 2014 the V8 project authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import os | ||
import shutil | ||
|
||
from testrunner.local import commands | ||
from testrunner.local import testsuite | ||
from testrunner.local import utils | ||
from testrunner.objects import testcase | ||
|
||
|
||
class BaseUnitTestsSuite(testsuite.TestSuite): | ||
def __init__(self, name, root): | ||
super(BaseUnitTestsSuite, self).__init__(name, root) | ||
|
||
def ListTests(self, context): | ||
shell = os.path.abspath(os.path.join(context.shell_dir, self.shell())) | ||
if utils.IsWindows(): | ||
shell += ".exe" | ||
output = commands.Execute(context.command_prefix + | ||
[shell, "--gtest_list_tests"] + | ||
context.extra_flags) | ||
if output.exit_code != 0: | ||
print output.stdout | ||
print output.stderr | ||
return [] | ||
tests = [] | ||
test_case = '' | ||
for line in output.stdout.splitlines(): | ||
test_desc = line.strip().split()[0] | ||
if test_desc.endswith('.'): | ||
test_case = test_desc | ||
elif test_case and test_desc: | ||
test = testcase.TestCase(self, test_case + test_desc, dependency=None) | ||
tests.append(test) | ||
tests.sort() | ||
return tests | ||
|
||
def GetFlagsForTestCase(self, testcase, context): | ||
return (testcase.flags + ["--gtest_filter=" + testcase.path] + | ||
["--gtest_random_seed=%s" % context.random_seed] + | ||
["--gtest_print_time=0"] + | ||
context.mode_flags) | ||
|
||
def shell(self): | ||
return "base-unittests" | ||
|
||
|
||
def GetSuite(name, root): | ||
return BaseUnitTestsSuite(name, root) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright 2014 the V8 project authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import os | ||
import shutil | ||
|
||
from testrunner.local import commands | ||
from testrunner.local import testsuite | ||
from testrunner.local import utils | ||
from testrunner.objects import testcase | ||
|
||
|
||
class CompilerUnitTestsSuite(testsuite.TestSuite): | ||
def __init__(self, name, root): | ||
super(CompilerUnitTestsSuite, self).__init__(name, root) | ||
|
||
def ListTests(self, context): | ||
shell = os.path.abspath(os.path.join(context.shell_dir, self.shell())) | ||
if utils.IsWindows(): | ||
shell += ".exe" | ||
output = commands.Execute(context.command_prefix + | ||
[shell, "--gtest_list_tests"] + | ||
context.extra_flags) | ||
if output.exit_code != 0: | ||
print output.stdout | ||
print output.stderr | ||
return [] | ||
tests = [] | ||
test_case = '' | ||
for line in output.stdout.splitlines(): | ||
test_desc = line.strip().split()[0] | ||
if test_desc.endswith('.'): | ||
test_case = test_desc | ||
elif test_case and test_desc: | ||
test = testcase.TestCase(self, test_case + test_desc, dependency=None) | ||
tests.append(test) | ||
tests.sort() | ||
return tests | ||
|
||
def GetFlagsForTestCase(self, testcase, context): | ||
return (testcase.flags + ["--gtest_filter=" + testcase.path] + | ||
["--gtest_random_seed=%s" % context.random_seed] + | ||
["--gtest_print_time=0"] + | ||
context.mode_flags) | ||
|
||
def shell(self): | ||
return "compiler-unittests" | ||
|
||
|
||
def GetSuite(name, root): | ||
return CompilerUnitTestsSuite(name, root) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright 2014 the V8 project authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import os | ||
import shutil | ||
|
||
from testrunner.local import commands | ||
from testrunner.local import testsuite | ||
from testrunner.local import utils | ||
from testrunner.objects import testcase | ||
|
||
|
||
class HeapUnitTestsSuite(testsuite.TestSuite): | ||
def __init__(self, name, root): | ||
super(HeapUnitTestsSuite, self).__init__(name, root) | ||
|
||
def ListTests(self, context): | ||
shell = os.path.abspath(os.path.join(context.shell_dir, self.shell())) | ||
if utils.IsWindows(): | ||
shell += ".exe" | ||
output = commands.Execute(context.command_prefix + | ||
[shell, "--gtest_list_tests"] + | ||
context.extra_flags) | ||
if output.exit_code != 0: | ||
print output.stdout | ||
print output.stderr | ||
return [] | ||
tests = [] | ||
test_case = '' | ||
for line in output.stdout.splitlines(): | ||
test_desc = line.strip().split()[0] | ||
if test_desc.endswith('.'): | ||
test_case = test_desc | ||
elif test_case and test_desc: | ||
test = testcase.TestCase(self, test_case + test_desc, dependency=None) | ||
tests.append(test) | ||
tests.sort() | ||
return tests | ||
|
||
def GetFlagsForTestCase(self, testcase, context): | ||
return (testcase.flags + ["--gtest_filter=" + testcase.path] + | ||
["--gtest_random_seed=%s" % context.random_seed] + | ||
["--gtest_print_time=0"] + | ||
context.mode_flags) | ||
|
||
def shell(self): | ||
return "heap-unittests" | ||
|
||
|
||
def GetSuite(name, root): | ||
return HeapUnitTestsSuite(name, root) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright 2014 the V8 project authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import os | ||
import shutil | ||
|
||
from testrunner.local import commands | ||
from testrunner.local import testsuite | ||
from testrunner.local import utils | ||
from testrunner.objects import testcase | ||
|
||
|
||
class LibplatformUnitTestsSuite(testsuite.TestSuite): | ||
def __init__(self, name, root): | ||
super(LibplatformUnitTestsSuite, self).__init__(name, root) | ||
|
||
def ListTests(self, context): | ||
shell = os.path.abspath(os.path.join(context.shell_dir, self.shell())) | ||
if utils.IsWindows(): | ||
shell += ".exe" | ||
output = commands.Execute(context.command_prefix + | ||
[shell, "--gtest_list_tests"] + | ||
context.extra_flags) | ||
if output.exit_code != 0: | ||
print output.stdout | ||
print output.stderr | ||
return [] | ||
tests = [] | ||
test_case = '' | ||
for line in output.stdout.splitlines(): | ||
test_desc = line.strip().split()[0] | ||
if test_desc.endswith('.'): | ||
test_case = test_desc | ||
elif test_case and test_desc: | ||
test = testcase.TestCase(self, test_case + test_desc, dependency=None) | ||
tests.append(test) | ||
tests.sort() | ||
return tests | ||
|
||
def GetFlagsForTestCase(self, testcase, context): | ||
return (testcase.flags + ["--gtest_filter=" + testcase.path] + | ||
["--gtest_random_seed=%s" % context.random_seed] + | ||
["--gtest_print_time=0"] + | ||
context.mode_flags) | ||
|
||
def shell(self): | ||
return "libplatform-unittests" | ||
|
||
|
||
def GetSuite(name, root): | ||
return LibplatformUnitTestsSuite(name, root) |
Oops, something went wrong.