[llvm-commits] [zorg] r172328 - in /zorg/trunk/zorg/buildbot: builders/ClangBuilder.py builders/DragonEggBuilder.py builders/LLVMBuilder.py builders/LLVMGCCBuilder.py commands/ClangTestCommand.py commands/__init__.py

David Blaikie dblaikie at gmail.com
Sat Jan 12 12:53:55 PST 2013


Author: dblaikie
Date: Sat Jan 12 14:53:55 2013
New Revision: 172328

URL: http://llvm.org/viewvc/llvm-project?rev=172328&view=rev
Log:
Migrate to LitTestCommand from ClangTestCommand

Move builders over to the more-better LitTestCommand and remove
ClangTestCommand entirely.

Removed:
    zorg/trunk/zorg/buildbot/commands/ClangTestCommand.py
Modified:
    zorg/trunk/zorg/buildbot/builders/ClangBuilder.py
    zorg/trunk/zorg/buildbot/builders/DragonEggBuilder.py
    zorg/trunk/zorg/buildbot/builders/LLVMBuilder.py
    zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py
    zorg/trunk/zorg/buildbot/commands/__init__.py

Modified: zorg/trunk/zorg/buildbot/builders/ClangBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/ClangBuilder.py?rev=172328&r1=172327&r2=172328&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/ClangBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/ClangBuilder.py Sat Jan 12 14:53:55 2013
@@ -12,7 +12,6 @@
 from zorg.buildbot.commands import DejaGNUCommand
 from zorg.buildbot.commands import SuppressionDejaGNUCommand
 from zorg.buildbot.commands.BatchFileDownload import BatchFileDownload
-from zorg.buildbot.commands.ClangTestCommand import ClangTestCommand
 from zorg.buildbot.commands.LitTestCommand import LitTestCommand
 from zorg.buildbot.PhasedBuilderUtils import GetLatestValidated, find_cc
 
@@ -314,7 +313,7 @@
                                           env=merged_env))
 
     if test:
-        f.addStep(ClangTestCommand(name='check-all',
+        f.addStep(LitTestCommand(name='check-all',
                                    command=[make, "check-all", "VERBOSE=1",
                                             WithProperties("LIT_ARGS=%s" % llvmTestArgs),
                                             WithProperties("TESTARGS=%s" % clangTestArgs),
@@ -438,7 +437,7 @@
                                          "clang-test.vcproj",
                                          "Debug|Win32"],
                                 workdir="llvm\\build\\tools\\clang\\test"))
-    f.addStep(ClangTestCommand(name='test-clang',
+    f.addStep(LitTestCommand(name='test-clang',
                                command=["vcbuild_test.bat"],
                                workdir="llvm\\build\\tools\\clang\\test"))
 
@@ -524,7 +523,7 @@
     f.addStep(BatchFileDownload(name='maketest',
                                 command=["ninja", "clang-test"],
                                 workdir="llvm\\build"))
-    f.addStep(ClangTestCommand(name='clang-test',
+    f.addStep(LitTestCommand(name='clang-test',
                                command=["maketest.bat"],
                                workdir="llvm\\build"))
 

Modified: zorg/trunk/zorg/buildbot/builders/DragonEggBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/DragonEggBuilder.py?rev=172328&r1=172327&r2=172328&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/DragonEggBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/DragonEggBuilder.py Sat Jan 12 14:53:55 2013
@@ -4,7 +4,7 @@
 from buildbot.steps.shell import Configure, ShellCommand
 from buildbot.steps.shell import WarningCountingShellCommand
 from buildbot.process.properties import WithProperties
-from zorg.buildbot.commands.ClangTestCommand import ClangTestCommand
+from zorg.buildbot.commands.LitTestCommand import LitTestCommand
 from zorg.buildbot.commands.NightlyTestCommand import NightlyTestCommand
 
 def getCCSetting(gcc, gxx):
@@ -175,7 +175,7 @@
 
       # Optionally run the LLVM testsuite.
       if check_llvm:
-        f.addStep(ClangTestCommand(name='check.llvm.%s' % stage,
+        f.addStep(LitTestCommand(name='check.llvm.%s' % stage,
                                    command=['nice', '-n', '10', 'make',
                                             WithProperties('LIT_ARGS=-v -j%s' % jobs),
                                             'check-all'
@@ -245,7 +245,7 @@
 
       # Optionally run the dragonegg testsuite.
       if check_dragonegg:
-        f.addStep(ClangTestCommand(name='check.dragonegg.%s' % stage,
+        f.addStep(LitTestCommand(name='check.dragonegg.%s' % stage,
                                    command=['nice', '-n', '10',
                                             'make', '-f', '../' + dragonegg_src_dir + '/Makefile',
                                             WithProperties('GCC=%(builddir)s/'+gcc_install_dir+'/bin/gcc'),
@@ -592,7 +592,7 @@
                                description='rm test-suite output directory',
                                haltOnFailure=True, workdir='.', env=env))
 
-    f.addStep(ClangTestCommand(name='make.check',
+    f.addStep(LitTestCommand(name='make.check',
                                command=['nice', '-n', '10',
                                         'make', '-f', '../' + dragonegg_src_dir + '/Makefile',
                                         WithProperties('GCC=' + gcc),

Modified: zorg/trunk/zorg/buildbot/builders/LLVMBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/LLVMBuilder.py?rev=172328&r1=172327&r2=172328&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/LLVMBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/LLVMBuilder.py Sat Jan 12 14:53:55 2013
@@ -7,7 +7,7 @@
 from buildbot.steps.shell import WarningCountingShellCommand
 from buildbot.process.properties import WithProperties
 
-from zorg.buildbot.commands.ClangTestCommand import ClangTestCommand
+from zorg.buildbot.commands.LitTestCommand import LitTestCommand
 
 from Util import getConfigArgs
 
@@ -123,7 +123,7 @@
             if valgrindSuppressions is not None:
                 litTestArgs += ' --vg-arg --suppressions=%%(builddir)s/llvm/%s' % valgrindSuppressions
         f.addStep(
-            ClangTestCommand(
+            LitTestCommand(
                 name            = 'test-llvm',
                 command         = [make, "check-lit", "VERBOSE=1",
                                    WithProperties("LIT_ARGS=%s" % litTestArgs)],

Modified: zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py?rev=172328&r1=172327&r2=172328&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/LLVMGCCBuilder.py Sat Jan 12 14:53:55 2013
@@ -4,7 +4,7 @@
 from buildbot.steps.shell import ShellCommand, SetProperty
 from buildbot.process.properties import WithProperties
 
-from zorg.buildbot.commands.ClangTestCommand import ClangTestCommand
+from zorg.buildbot.commands.LitTestCommand import LitTestCommand
 
 from Util import getConfigArgs
 
@@ -100,7 +100,7 @@
                                         timeout       = timeout * 60))
 
   # Run LLVM tests (stage 1).
-  f.addStep(ClangTestCommand(name = 'test.llvm.stage1',
+  f.addStep(LitTestCommand(name = 'test.llvm.stage1',
                              command = [make, "check-lit", "VERBOSE=1"],
                              description     = ["testing", "llvm"],
                              descriptionDone = ["test",    "llvm"],
@@ -219,7 +219,7 @@
                                         timeout       = timeout * 60))
 
   # Run LLVM tests (stage 2).
-  f.addStep(ClangTestCommand(name = 'test.llvm.stage2',
+  f.addStep(LitTestCommand(name = 'test.llvm.stage2',
                              command = [make, "check-lit", "VERBOSE=1"],
                              description     = ["testing", "llvm", "(stage 2)"],
                              descriptionDone = ["test",    "llvm", "(stage 2)"],

Removed: zorg/trunk/zorg/buildbot/commands/ClangTestCommand.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/commands/ClangTestCommand.py?rev=172327&view=auto
==============================================================================
--- zorg/trunk/zorg/buildbot/commands/ClangTestCommand.py (original)
+++ zorg/trunk/zorg/buildbot/commands/ClangTestCommand.py (removed)
@@ -1,75 +0,0 @@
-import itertools
-import re
-import os
-
-import buildbot
-import buildbot.steps.shell
-
-# FIXME: Rename to LitTestCommand.
-class ClangTestCommand(buildbot.steps.shell.Test):
-  # FIXME: We should process things in a test observer instead of at the end.
-
-  kTestLineRE = re.compile(r'([^ ]*): (.*) \(.*.*\)')
-  kTestFailureLogStartRE = re.compile(r"""\*{4,80} TEST '(.*)' .*""")
-  kTestFailureLogStopRE = re.compile(r"""\*{10,80}""")
-
-  # Show a maximum of 20 individual failure logs.
-  kMaxFailureLogs = 20
-
-  def evaluateCommand(self, cmd):
-    grouped = {}
-    failureLogs = []
-    lines = self.getLog('stdio').readlines()
-
-    it = iter(lines)
-    inFailure = None
-    for ln in it:
-      # See if we are inside a failure log.
-      if inFailure:
-        inFailure[1].append(ln)
-        if ClangTestCommand.kTestFailureLogStopRE.match(ln):
-          failureLogs.append(tuple(inFailure))
-          inFailure = None
-        continue
-
-      ln = ln.strip()
-      if not ln:
-        continue
-
-      # Check for test failure logs.
-      m = ClangTestCommand.kTestFailureLogStartRE.match(ln)
-      if m:
-        inFailure = (m.group(1), [ln])
-        continue
-
-      # Otherwise expect a test status line.
-      m = ClangTestCommand.kTestLineRE.match(ln)
-      if m:
-        groupName = m.group(1)
-        testName = m.group(2)
-        if groupName not in grouped:
-          grouped[groupName] = []
-        grouped[groupName].append(testName)
-
-    if inFailure:
-      # FIXME: Different error?
-      raise ValueError,"Unexpected clang test running output, unterminated failure log!"
-
-    for name,items in grouped.items():
-      if name != 'PASS' and items:
-        self.addCompleteLog(name.lower(), '\n'.join(items) + '\n')
-    for name,items in failureLogs[:self.kMaxFailureLogs]:
-      self.addCompleteLog(os.path.basename(name.lower()),
-                          ''.join(items) + '\n')
-
-    numPass = len(grouped.get('PASS',()))
-    numFail = len(grouped.get('FAIL',()))
-    numXFail = len(grouped.get('XFAIL',()))
-    numXPass = len(grouped.get('XPASS',()))
-    numUnsupported = len(grouped.get('UNSUPPORTED',()))
-    numUnresolved = len(grouped.get('UNRESOLVED',()))
-    self.setTestResults(total=numPass + numFail + numXFail + numXPass,
-                        failed=numFail + numXPass + numUnresolved,
-                        passed=numPass + numXFail,
-                        warnings=numXFail)
-    return buildbot.steps.shell.Test.evaluateCommand(self, cmd)

Modified: zorg/trunk/zorg/buildbot/commands/__init__.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/commands/__init__.py?rev=172328&r1=172327&r2=172328&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/commands/__init__.py (original)
+++ zorg/trunk/zorg/buildbot/commands/__init__.py Sat Jan 12 14:53:55 2013
@@ -1,6 +1,5 @@
 import AnalyzerCompareCommand
 import BatchFileDownload
-import ClangTestCommand
 import LitTestCommand
 import SuppressionDejaGNUCommand
 import DejaGNUCommand





More information about the llvm-commits mailing list