Commit d50fbb63 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Fix bug that meant that dependent tests were never reported as

failing (though they could still crash).
(Cache the result of the test in the output object, not in the
test object which is reused from the prerequisite to the dependent.)
Review URL: http://codereview.chromium.org/321001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 38e2b5c9
...@@ -33,6 +33,17 @@ test-debug/DebuggerAgent: PASS, (PASS || FAIL) if $system == linux ...@@ -33,6 +33,17 @@ test-debug/DebuggerAgent: PASS, (PASS || FAIL) if $system == linux
# BUG(382): Weird test. Can't guarantee that it never times out. # BUG(382): Weird test. Can't guarantee that it never times out.
test-api/ApplyInterruption: PASS || TIMEOUT test-api/ApplyInterruption: PASS || TIMEOUT
# This is about to go away anyway since new snapshot code is on the way.
test-serialize/Deserialize: FAIL
test-serialize/DeserializeAndRunScript: FAIL
test-serialize/DeserializeNatives: FAIL
test-serialize/DeserializeExtensions: FAIL
# These tests always fail. They are here to test test.py. If
# they don't fail then test.py has failed.
test-serialize/TestThatAlwaysFails: FAIL
test-serialize/DependentTestThatAlwaysFails: FAIL
[ $arch == arm ] [ $arch == arm ]
......
...@@ -286,3 +286,22 @@ DEPENDENT_TEST(DeserializeExtensions, Serialize) { ...@@ -286,3 +286,22 @@ DEPENDENT_TEST(DeserializeExtensions, Serialize) {
v8::Local<v8::Value> value = script->Run(); v8::Local<v8::Value> value = script->Run();
CHECK(value->IsUndefined()); CHECK(value->IsUndefined());
} }
extern "C" void V8_Fatal(const char* file, int line, const char* format, ...);
TEST(TestThatAlwaysSucceeds) {
}
TEST(TestThatAlwaysFails) {
bool ArtificialFailure = false;
CHECK(ArtificialFailure);
}
DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) {
bool ArtificialFailure2 = false;
CHECK(ArtificialFailure2);
}
...@@ -326,6 +326,7 @@ class CommandOutput(object): ...@@ -326,6 +326,7 @@ class CommandOutput(object):
self.timed_out = timed_out self.timed_out = timed_out
self.stdout = stdout self.stdout = stdout
self.stderr = stderr self.stderr = stderr
self.failed = None
class TestCase(object): class TestCase(object):
...@@ -333,7 +334,6 @@ class TestCase(object): ...@@ -333,7 +334,6 @@ class TestCase(object):
def __init__(self, context, path): def __init__(self, context, path):
self.path = path self.path = path
self.context = context self.context = context
self.failed = None
self.duration = None self.duration = None
def IsNegative(self): def IsNegative(self):
...@@ -343,9 +343,9 @@ class TestCase(object): ...@@ -343,9 +343,9 @@ class TestCase(object):
return cmp(other.duration, self.duration) return cmp(other.duration, self.duration)
def DidFail(self, output): def DidFail(self, output):
if self.failed is None: if output.failed is None:
self.failed = self.IsFailureOutput(output) output.failed = self.IsFailureOutput(output)
return self.failed return output.failed
def IsFailureOutput(self, output): def IsFailureOutput(self, output):
return output.exit_code != 0 return output.exit_code != 0
......
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