[llvm-commits] [zorg] r109845 - /zorg/trunk/lnt/lnt/tests/nt.py

Daniel Dunbar daniel at zuster.org
Thu Jul 29 19:56:56 PDT 2010


Author: ddunbar
Date: Thu Jul 29 21:56:56 2010
New Revision: 109845

URL: http://llvm.org/viewvc/llvm-project?rev=109845&view=rev
Log:
LNT/simple: Make --only-test work for multilevel paths (i.e., MultiSource/Applications), by initializing the directories and copy Makefiles to the obj root.

Modified:
    zorg/trunk/lnt/lnt/tests/nt.py

Modified: zorg/trunk/lnt/lnt/tests/nt.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/tests/nt.py?rev=109845&r1=109844&r2=109845&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/tests/nt.py (original)
+++ zorg/trunk/lnt/lnt/tests/nt.py Thu Jul 29 21:56:56 2010
@@ -1,6 +1,7 @@
 import csv
 import os
 import re
+import shutil
 import subprocess
 import sys
 import time
@@ -255,6 +256,20 @@
         if res != 0:
             fatal('configure failed, log is here: %r' % configure_log_path)
 
+    # If running with --only-test, creating any dirs which might be missing and
+    # copy Makefiles.
+    if opts.only_test is not None:
+        suffix = ''
+        for component in opts.only_test.split('/'):
+            suffix = os.path.join(suffix, component)
+            obj_path = os.path.join(basedir, suffix)
+            src_path = os.path.join(opts.test_suite_root, suffix)
+            if not os.path.exists(obj_path):
+                print '%s: initializing test dir %s' % (timestamp(), suffix)
+                os.mkdir(obj_path)
+                shutil.copyfile(os.path.join(src_path, 'Makefile'),
+                                os.path.join(obj_path, 'Makefile'))
+
     # Always blow away any existing report.
     report_path = os.path.join(basedir)
     if opts.only_test is not None:





More information about the llvm-commits mailing list