Use non-overlapping names for traces.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Mon, 12 Dec 2011 09:18:45 +0000 (09:18 +0000)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Mon, 12 Dec 2011 09:18:45 +0000 (09:18 +0000)
driver.py

index 9894c9c80447cc806401361b9bf497b8fc4267ab..9caf39510b1a1aa71ab77dba4499ff97c9f176d5 100755 (executable)
--- a/driver.py
+++ b/driver.py
@@ -243,7 +243,13 @@ class TestCase:
             return
 
         if self.trace_file is None:
-            name, ext = os.path.splitext(os.path.basename(self.cmd[0]))
+            if self.ref_dump is not None:
+                name = self.ref_dump
+            else:
+                name = self.cmd[0]
+            name, ext = os.path.splitext(os.path.basename(name))
+            while ext:
+                name, ext = os.path.splitext(os.path.basename(name))
             self.trace_file = os.path.abspath(os.path.join(self.results, name + '.trace'))
         if os.path.exists(self.trace_file):
             os.remove(self.trace_file)