[Lldb-commits] [lldb] r106929 - /lldb/trunk/test/dotest.py

Johnny Chen johnny.chen at apple.com
Fri Jun 25 17:19:32 PDT 2010


Author: johnny
Date: Fri Jun 25 19:19:32 2010
New Revision: 106929

URL: http://llvm.org/viewvc/llvm-project?rev=106929&view=rev
Log:
No need to add the test script containing directory to sys.path more than once.

Modified:
    lldb/trunk/test/dotest.py

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=106929&r1=106928&r2=106929&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Fri Jun 25 19:19:32 2010
@@ -112,7 +112,8 @@
 
         if '.py' == os.path.splitext(name)[1] and name.startswith(prefix):
             # We found a pattern match for our test case.  Add it to the suite.
-            sys.path.append(dir)
+            if not sys.path.count(dir):
+                sys.path.append(dir)
             base = os.path.splitext(name)[0]
             suite.addTests(unittest.defaultTestLoader.loadTestsFromName(base))
 





More information about the lldb-commits mailing list