[llvm-commits] [LNT] r165146 - in /lnt/trunk: lnt/testing/util/compilers.py tests/SharedInputs/FakeCompilers/clang-git-2 tests/SharedInputs/FakeCompilers/fakecompiler.py tests/testing/Compilers.py

Daniel Dunbar daniel at zuster.org
Wed Oct 3 12:25:15 PDT 2012


Author: ddunbar
Date: Wed Oct  3 14:25:15 2012
New Revision: 165146

URL: http://llvm.org/viewvc/llvm-project?rev=165146&view=rev
Log:
lnt.testing.util.compilers: Recognize multiple git remote names.

Added:
    lnt/trunk/tests/SharedInputs/FakeCompilers/clang-git-2   (with props)
Modified:
    lnt/trunk/lnt/testing/util/compilers.py
    lnt/trunk/tests/SharedInputs/FakeCompilers/fakecompiler.py
    lnt/trunk/tests/testing/Compilers.py

Modified: lnt/trunk/lnt/testing/util/compilers.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/testing/util/compilers.py?rev=165146&r1=165145&r2=165146&view=diff
==============================================================================
--- lnt/trunk/lnt/testing/util/compilers.py (original)
+++ lnt/trunk/lnt/testing/util/compilers.py Wed Oct  3 14:25:15 2012
@@ -123,7 +123,7 @@
         else:
             # Otherwise, see if we can match a branch and a tag name. That could
             # be a git hash.
-            m = re.match(r'\(([^ ]+) ([^ ]+)\)', cc_build_string)
+            m = re.match(r'\((.+) ([^ ]+)\)', cc_build_string)
             if m:
                 cc_src_branch,cc_src_revision = m.groups()
             else:
@@ -144,7 +144,7 @@
         # Newer Clang's can report separate versions for LLVM and Clang. Parse
         # the cc_extra text so we can get the maximum SVN version.
         if cc_extra.startswith('(') and cc_extra.endswith(')'):
-            m = re.match(r'\(([^ ]*) (.*)\)', cc_extra)
+            m = re.match(r'\((.+) ([^ ]+)\)', cc_extra)
             if m:
                 cc_alt_src_branch,cc_alt_src_revision = m.groups()
             else:

Added: lnt/trunk/tests/SharedInputs/FakeCompilers/clang-git-2
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/SharedInputs/FakeCompilers/clang-git-2?rev=165146&view=auto
==============================================================================
--- lnt/trunk/tests/SharedInputs/FakeCompilers/clang-git-2 (added)
+++ lnt/trunk/tests/SharedInputs/FakeCompilers/clang-git-2 Wed Oct  3 14:25:15 2012
@@ -0,0 +1 @@
+link fakecompiler.py
\ No newline at end of file

Propchange: lnt/trunk/tests/SharedInputs/FakeCompilers/clang-git-2
------------------------------------------------------------------------------
    svn:special = *

Modified: lnt/trunk/tests/SharedInputs/FakeCompilers/fakecompiler.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/SharedInputs/FakeCompilers/fakecompiler.py?rev=165146&r1=165145&r2=165146&view=diff
==============================================================================
--- lnt/trunk/tests/SharedInputs/FakeCompilers/fakecompiler.py (original)
+++ lnt/trunk/tests/SharedInputs/FakeCompilers/fakecompiler.py Wed Oct  3 14:25:15 2012
@@ -93,6 +93,21 @@
  "%s" "-cc1" "-E" ... more boring stuff here ...""" % (
             g_program,)
 
+# Clang build from a git repository.
+class Clang_git_2(LLVMCompiler):
+    compiler_name = "clang-git-2"
+
+    def print_verbose_info(self):
+        print >>sys.stderr, """\
+clang version 3.2\
+ (/d/g/puzzle/clang.git git:/git/puzzlebox/clang.git 8ab09316f63ea99ff23b2684c454b1008b8d5f10)\
+ (http://llvm.org/git/llvm.git /d/g/puzzle/llvm.git git:/git/puzzlebox/llvm.git 7c53f795961cc2d35b85d315aadb2ac135a0fdb2)
+Target: x86_64-apple-darwin12.2.0
+Thread model: posix"""
+        print >>sys.stderr, """\
+ "%s" "-cc1" "-E" ... more boring stuff here ...""" % (
+            g_program,)
+
 class AppleClang_138_1(LLVMCompiler):
     compiler_name = "apple-clang-138.1"
 

Modified: lnt/trunk/tests/testing/Compilers.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/testing/Compilers.py?rev=165146&r1=165145&r2=165146&view=diff
==============================================================================
--- lnt/trunk/tests/testing/Compilers.py (original)
+++ lnt/trunk/tests/testing/Compilers.py Wed Oct  3 14:25:15 2012
@@ -48,3 +48,11 @@
 assert info['inferred_run_order'] == '%s,%s' % (
     '37ce0feee598d82e7220fa0a4b110619cae6ea72',
     '60fca4f64e697ad834ce7ee8c2e478cae394c7dc')
+
+info = get_info("clang-git-2")
+pprint.pprint(info)
+assert info['cc_name'] == 'clang'
+assert info['cc_build'] == 'DEV'
+assert info['inferred_run_order'] == '%s,%s' % (
+    '8ab09316f63ea99ff23b2684c454b1008b8d5f10',
+    '7c53f795961cc2d35b85d315aadb2ac135a0fdb2')





More information about the llvm-commits mailing list