Revision: 3115
Author: [email protected]
Date: Thu Oct 22 12:09:09 2009
Log: 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
http://code.google.com/p/v8/source/detail?r=3115

Modified:
  /branches/bleeding_edge/test/cctest/cctest.status
  /branches/bleeding_edge/test/cctest/test-serialize.cc
  /branches/bleeding_edge/tools/test.py

=======================================
--- /branches/bleeding_edge/test/cctest/cctest.status   Sun Sep 13 23:57:24  
2009
+++ /branches/bleeding_edge/test/cctest/cctest.status   Thu Oct 22 12:09:09  
2009
@@ -33,6 +33,17 @@
  # BUG(382): Weird test. Can't guarantee that it never times out.
  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 ]

=======================================
--- /branches/bleeding_edge/test/cctest/test-serialize.cc       Mon Aug 24  
04:57:57 2009
+++ /branches/bleeding_edge/test/cctest/test-serialize.cc       Thu Oct 22  
12:09:09 2009
@@ -286,3 +286,22 @@
    v8::Local<v8::Value> value = script->Run();
    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);
+}
=======================================
--- /branches/bleeding_edge/tools/test.py       Thu Sep 10 05:59:49 2009
+++ /branches/bleeding_edge/tools/test.py       Thu Oct 22 12:09:09 2009
@@ -326,6 +326,7 @@
      self.timed_out = timed_out
      self.stdout = stdout
      self.stderr = stderr
+    self.failed = None


  class TestCase(object):
@@ -333,7 +334,6 @@
    def __init__(self, context, path):
      self.path = path
      self.context = context
-    self.failed = None
      self.duration = None

    def IsNegative(self):
@@ -343,9 +343,9 @@
      return cmp(other.duration, self.duration)

    def DidFail(self, output):
-    if self.failed is None:
-      self.failed = self.IsFailureOutput(output)
-    return self.failed
+    if output.failed is None:
+      output.failed = self.IsFailureOutput(output)
+    return output.failed

    def IsFailureOutput(self, output):
      return output.exit_code != 0

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to