- Marked flaky windows gc test as flaky.

- Added support for --cat in test runner.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@190 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6b7e71a2
...@@ -58,6 +58,9 @@ class MjsunitTestCase(test.TestCase): ...@@ -58,6 +58,9 @@ class MjsunitTestCase(test.TestCase):
result += [framework, self.file] result += [framework, self.file]
return result return result
def GetSource(self):
return open(self.file).read()
class MjsunitTestConfiguration(test.TestConfiguration): class MjsunitTestConfiguration(test.TestConfiguration):
......
...@@ -752,6 +752,7 @@ js1_5/decompilation/regress-406555: PASS || FAIL ...@@ -752,6 +752,7 @@ js1_5/decompilation/regress-406555: PASS || FAIL
# This test is flaky because of the default timer resolution on Windows. # This test is flaky because of the default timer resolution on Windows.
js1_5/extensions/regress-363258: PASS || FAIL js1_5/extensions/regress-363258: PASS || FAIL
mozilla/js1_5/GC/regress-383269-02: PASS, FLAKY IF $mode == debug
[ $FAST == yes ] [ $FAST == yes ]
......
...@@ -82,6 +82,9 @@ class MozillaTestCase(test.TestCase): ...@@ -82,6 +82,9 @@ class MozillaTestCase(test.TestCase):
def GetName(self): def GetName(self):
return self.path[-1] return self.path[-1]
def GetSource(self):
return open(self.filename).read()
class MozillaTestConfiguration(test.TestConfiguration): class MozillaTestConfiguration(test.TestConfiguration):
......
...@@ -259,6 +259,9 @@ class TestCase(object): ...@@ -259,6 +259,9 @@ class TestCase(object):
def IsFailureOutput(self, output): def IsFailureOutput(self, output):
return output.exit_code != 0 return output.exit_code != 0
def GetSource(self):
return "(no source available)"
def Run(self): def Run(self):
command = self.GetCommand() command = self.GetCommand()
full_command = self.context.processor(command) full_command = self.context.processor(command)
...@@ -948,6 +951,8 @@ def BuildOptions(): ...@@ -948,6 +951,8 @@ def BuildOptions():
result.add_option("--arch", help='The architecture to run tests for', result.add_option("--arch", help='The architecture to run tests for',
default=ARCH_GUESS) default=ARCH_GUESS)
result.add_option("--special-command", default=None) result.add_option("--special-command", default=None)
result.add_option("--cat", help="Print the source of the tests",
default=False, action="store_true")
return result return result
...@@ -1069,6 +1074,7 @@ def Main(): ...@@ -1069,6 +1074,7 @@ def Main():
# List the tests # List the tests
all_cases = [ ] all_cases = [ ]
all_unused = [ ] all_unused = [ ]
unclassified_tests = [ ]
for path in paths: for path in paths:
for mode in options.mode: for mode in options.mode:
env = { env = {
...@@ -1077,10 +1083,24 @@ def Main(): ...@@ -1077,10 +1083,24 @@ def Main():
'arch': options.arch 'arch': options.arch
} }
test_list = root.ListTests([], path, context, mode) test_list = root.ListTests([], path, context, mode)
unclassified_tests += test_list
(cases, unused_rules) = config.ClassifyTests(test_list, env) (cases, unused_rules) = config.ClassifyTests(test_list, env)
all_cases += cases all_cases += cases
all_unused.append(unused_rules) all_unused.append(unused_rules)
if options.cat:
visited = set()
for test in unclassified_tests:
key = tuple(test.path)
if key in visited:
continue
visited.add(key)
print "--- begin source: %s ---" % test.GetLabel()
source = test.GetSource().strip()
print source
print "--- end source: %s ---" % test.GetLabel()
return 0
# for rule in unused_rules: # for rule in unused_rules:
# print "Rule for '%s' was not used." % '/'.join([str(s) for s in rule.path]) # print "Rule for '%s' was not used." % '/'.join([str(s) for s in rule.path])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment