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

Filipe Cabecinhas me at filcab.net
Wed Aug 8 08:05:05 PDT 2012


Author: filcab
Date: Wed Aug  8 10:05:04 2012
New Revision: 161492

URL: http://llvm.org/viewvc/llvm-project?rev=161492&view=rev
Log:
Make dotest.py runnable from a directory other than lldb/test

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=161492&r1=161491&r2=161492&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Wed Aug  8 10:05:04 2012
@@ -661,8 +661,9 @@
         #
         # where the make directory contains the Makefile.rules file.
         if len(testdirs) != 1 or os.path.basename(orig_testdirs[0]) != 'test':
+            scriptdir = os.path.dirname(__file__)
             # Don't copy the .svn stuffs.
-            copytree('make', os.path.join(rdir, 'make'),
+            copytree(os.path.join(scriptdir, 'make'), os.path.join(rdir, 'make'),
                      ignore=ignore_patterns('.svn'))
 
     #print "testdirs:", testdirs
@@ -741,7 +742,7 @@
     sys.path.append(scriptPath)
     sys.path.append(pluginPath)
     sys.path.append(pexpectPath)
-    
+
     # This is our base name component.
     base = os.path.abspath(os.path.join(scriptPath, os.pardir))
 
@@ -807,7 +808,7 @@
     else:
         os.environ["LLDB_EXEC"] = lldbExec
         #print "The 'lldb' from PATH env variable", lldbExec
-    
+
     if os.path.isdir(os.path.join(base, '.svn')):
         pipe = subprocess.Popen(["svn", "info", base], stdout = subprocess.PIPE)
         svn_info = pipe.stdout.read()
@@ -822,7 +823,7 @@
     # The '-i' option is used to skip looking for lldb.py in the build tree.
     if ignore:
         return
-        
+
     dbgPath  = os.path.join(base, *(xcode3_build_dir + dbg + python_resource_dir))
     dbgPath2 = os.path.join(base, *(xcode4_build_dir + dbg + python_resource_dir))
     relPath  = os.path.join(base, *(xcode3_build_dir + rel + python_resource_dir))
@@ -938,7 +939,7 @@
             # and no '-g' option is specified
             if filters and fs4all and not filtered:
                 continue
-                
+
             # Add either the filtered test case(s) (which is done before) or the entire test class.
             if not filterspec or not filtered:
                 # A simple case of just the module name.  Also the failover case
@@ -1212,7 +1213,7 @@
                     new_stdout.close()
                 new_stdout = open("%s.%s" % (old_stdout.name, configPostfix), "w")
                 sys.stdout = new_stdout
- 
+
             # If we specified a relocated directory to run the test suite, do
             # the extra housekeeping to copy the testdirs to a configStringified
             # directory and to update sys.path before invoking the test runner.
@@ -1356,7 +1357,7 @@
                                                   verbosity=(1 if progress_bar else verbose),
                                                   failfast=failfast,
                                                   resultclass=LLDBTestResult).run(suite)
-        
+
 
 if sdir_has_content:
     sys.stderr.write("Session logs for test failures/errors/unexpected successes"





More information about the lldb-commits mailing list