[Lldb-commits] [lldb] r133495 - in /lldb/trunk/test: lldbtest.py types/AbstractBase.py
Johnny Chen
johnny.chen at apple.com
Mon Jun 20 17:53:00 PDT 2011
Author: johnny
Date: Mon Jun 20 19:53:00 2011
New Revision: 133495
URL: http://llvm.org/viewvc/llvm-project?rev=133495&view=rev
Log:
For now, insert some delays between succesive test cases in the test/types directory
if not already specified by the test driver (via ./dotest -w). Remove the AbstractBase.setUp()
method definition when/if we find out the cause of the failures if no delays are inserted
between these test cases.
Modified:
lldb/trunk/test/lldbtest.py
lldb/trunk/test/types/AbstractBase.py
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=133495&r1=133494&r2=133495&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Mon Jun 20 19:53:00 2011
@@ -465,6 +465,15 @@
print >> sys.stderr, "Restore dir to:", cls.oldcwd
os.chdir(cls.oldcwd)
+ def doDelay(self):
+ """See option -w of dotest.py."""
+ if ("LLDB_WAIT_BETWEEN_TEST_CASES" in os.environ and
+ os.environ["LLDB_WAIT_BETWEEN_TEST_CASES"] == 'YES'):
+ waitTime = 1.0
+ if "LLDB_TIME_WAIT_BETWEEN_TEST_CASES" in os.environ:
+ waitTime = float(os.environ["LLDB_TIME_WAIT_BETWEEN_TEST_CASES"])
+ time.sleep(waitTime)
+
def setUp(self):
#import traceback
#traceback.print_stack()
@@ -496,12 +505,8 @@
except AttributeError:
pass
- if ("LLDB_WAIT_BETWEEN_TEST_CASES" in os.environ and
- os.environ["LLDB_WAIT_BETWEEN_TEST_CASES"] == 'YES'):
- waitTime = 1.0
- if "LLDB_TIME_WAIT_BETWEEN_TEST_CASES" in os.environ:
- waitTime = float(os.environ["LLDB_TIME_WAIT_BETWEEN_TEST_CASES"])
- time.sleep(waitTime)
+ # Insert some delay between successive test cases if specified.
+ self.doDelay()
if "LLDB_MAX_LAUNCH_COUNT" in os.environ:
self.maxLaunchCount = int(os.environ["LLDB_MAX_LAUNCH_COUNT"])
Modified: lldb/trunk/test/types/AbstractBase.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/AbstractBase.py?rev=133495&r1=133494&r2=133495&view=diff
==============================================================================
--- lldb/trunk/test/types/AbstractBase.py (original)
+++ lldb/trunk/test/types/AbstractBase.py Mon Jun 20 19:53:00 2011
@@ -20,6 +20,17 @@
# Assert message.
DATA_TYPE_GROKKED = "Data type from expr parser output is parsed correctly"
+ # FIXME: Remove this method when/if we find out the cause of the failures
+ # if no delays are inserted between test cases.
+ def setUp(self):
+ # Call super's setUp().
+ TestBase.setUp(self)
+ # Insert some delay for running test cases under test/types if not
+ # already so by the TestBase.setUp().
+ if "LLDB_WAIT_BETWEEN_TEST_CASES" not in os.environ:
+ #print "some delay, please ...."
+ time.sleep(1.0)
+
def generic_type_tester(self, atoms, quotedDisplay=False):
"""Test that variables with basic types are displayed correctly."""
More information about the lldb-commits
mailing list