[Lldb-commits] [lldb] r137741 - /lldb/trunk/test/redo.py
Johnny Chen
johnny.chen at apple.com
Tue Aug 16 13:03:00 PDT 2011
Author: johnny
Date: Tue Aug 16 15:02:59 2011
New Revision: 137741
URL: http://llvm.org/viewvc/llvm-project?rev=137741&view=rev
Log:
The redo script did not take into account the compiler and architecture configuration of the failed tests.
Modified:
lldb/trunk/test/redo.py
Modified: lldb/trunk/test/redo.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/redo.py?rev=137741&r1=137740&r2=137741&view=diff
==============================================================================
--- lldb/trunk/test/redo.py (original)
+++ lldb/trunk/test/redo.py Tue Aug 16 15:02:59 2011
@@ -23,6 +23,8 @@
# To be filled with the filterspecs found in the session logs.
redo_specs = []
+comp_specs = set()
+arch_specs = set()
def usage():
print"""\
@@ -49,10 +51,17 @@
# This is the pattern for the line from the log file to redo a test.
# We want the filter spec.
-pattern = re.compile("^\./dotest\.py.*-f (.*)$")
+filter_pattern = re.compile("^\./dotest\.py.*-f (.*)$")
+comp_pattern = re.compile(" -C ([^ ]+) ")
+arch_pattern = re.compile(" -A ([^ ]+) ")
def redo(suffix, dir, names):
"""Visitor function for os.path.walk(path, visit, arg)."""
global redo_specs
+ global comp_specs
+ global arch_specs
+ global filter_pattern
+ global comp_pattern
+ global arch_pattern
for name in names:
if name.endswith(suffix):
@@ -61,11 +70,17 @@
with open(os.path.join(dir, name), 'r') as log:
content = log.read()
for line in content.splitlines():
- match = pattern.match(line)
+ match = filter_pattern.match(line)
if match:
filterspec = match.group(1)
print "adding filterspec:", filterspec
redo_specs.append(filterspec)
+ comp = comp_pattern.search(line)
+ if comp:
+ comp_specs.add(comp.group(1))
+ arch = arch_pattern.search(line)
+ if arch:
+ arch_specs.add(arch.group(1))
else:
continue
@@ -104,8 +119,14 @@
os.chdir(test_dir)
os.path.walk(session_dir_path, redo, ".log")
- command = "./dotest.py -v %s -f " % ("" if no_trace else "-t")
filters = " -f ".join(redo_specs)
+ compilers = (" -C %s" % "^".join(comp_specs)) if comp_specs else None
+ archs = (" -A %s" % "^".join(arch_specs)) if arch_specs else None
+
+ command = "./dotest.py %s %s -v %s -f " % (compilers if compilers else "",
+ archs if archs else "",
+ "" if no_trace else "-t")
+
print "Running %s" % (command + filters)
os.system(command + filters)
More information about the lldb-commits
mailing list