Reviewers: Michael Starzinger,

Description:
Add warning to cctest when running multiple tests in sequence.

[email protected]
BUG=

Please review this at https://codereview.chromium.org/23067008/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M test/cctest/cctest.cc


Index: test/cctest/cctest.cc
diff --git a/test/cctest/cctest.cc b/test/cctest/cctest.cc
index a2caf0f3baa7cfd9e8ec36c611803850f857d8f9..e5986f358050fc5e572e3c07b8a5710980a28b8a 100644
--- a/test/cctest/cctest.cc
+++ b/test/cctest/cctest.cc
@@ -106,6 +106,13 @@ class CcTestArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
 };


+void SuggestTestHarness(int tests) {
+  if (tests == 0) return;
+  printf("Running multiple tests in sequence is deprecated and may cause "
+         "bogus failure.  Consider using tools/run-tests.py instead.\n");
+}
+
+
 int main(int argc, char* argv[]) {
   v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
   v8::internal::FLAG_harmony_array_buffer = true;
@@ -138,8 +145,8 @@ int main(int argc, char* argv[]) {
           if (test->enabled()
               && strcmp(test->file(), file) == 0
               && strcmp(test->name(), name) == 0) {
+            SuggestTestHarness(tests_run++);
             test->Run();
-            tests_run++;
           }
           test = test->prev();
         }
@@ -152,8 +159,8 @@ int main(int argc, char* argv[]) {
           if (test->enabled()
               && (strcmp(test->file(), file_or_name) == 0
                   || strcmp(test->name(), file_or_name) == 0)) {
+            SuggestTestHarness(tests_run++);
             test->Run();
-            tests_run++;
           }
           test = test->prev();
         }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to