[Lldb-commits] [lldb] r131501 - /lldb/trunk/test/dotest.py
Johnny Chen
johnny.chen at apple.com
Tue May 17 15:58:50 PDT 2011
Author: johnny
Date: Tue May 17 17:58:50 2011
New Revision: 131501
URL: http://llvm.org/viewvc/llvm-project?rev=131501&view=rev
Log:
Let's also stick the svn info for the base directory into a file under
the session directory, which also includes the command line used to invoke
the test suite.
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=131501&r1=131500&r2=131501&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Tue May 17 17:58:50 2011
@@ -133,6 +133,9 @@
# Set this flag if there is any session info dumped during the test run.
sdir_has_content = False
+# svn_info stores the output from 'svn info lldb.base.dir'.
+svn_info = ''
+
# Default verbosity is 0.
verbose = 0
@@ -506,6 +509,7 @@
global rdir
global testdirs
global dumpSysPath
+ global svn_info
# Get the directory containing the current script.
if "DOTEST_PROFILE" in os.environ and "DOTEST_SCRIPT_DIR" in os.environ:
@@ -581,7 +585,10 @@
#print "The 'lldb' executable path is", lldbExec
os.system('%s -v' % lldbExec)
- os.system('svn info %s' % base)
+ import subprocess
+ pipe = subprocess.Popen(["svn", "info", base], stdout = subprocess.PIPE)
+ svn_info = pipe.stdout.read()
+ print svn_info
global ignore
@@ -816,6 +823,13 @@
" will go into directory '%s'\n" % sdir_name)
sys.stderr.write("Command invoked: %s\n" % getMyCommandLine())
+if not os.path.isdir(sdir_name):
+ os.mkdir(sdir_name)
+fname = os.path.join(sdir_name, "svn-info")
+with open(fname, "w") as f:
+ print >> f, svn_info
+ print >> f, "Command invoked: %s\n" % getMyCommandLine()
+
#
# Invoke the default TextTestRunner to run the test suite, possibly iterating
# over different configurations.
More information about the lldb-commits
mailing list