[SCM] build.samba.org - branch master updated

Jelmer Vernooij jelmer at samba.org
Sat Nov 13 06:40:24 MST 2010


The branch, master has been updated
       via  0ab262b attempt to speed up log parsing by compiling regexes beforehand.
      from  c868b29 Allow limiting the number of revisions that we look back.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0ab262b677046d51191a2598d040e09f0d59ff7b
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Nov 13 14:40:18 2010 +0100

    attempt to speed up log parsing by compiling regexes beforehand.

-----------------------------------------------------------------------

Summary of changes:
 buildfarm/data.py |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 8629842..0bd1498 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -109,30 +109,17 @@ def build_status_from_logs(log, err):
     ret = BuildStatus()
 
     stages = []
+    re_status = re.compile("^([A-Z_]+) STATUS:(\s*\d+)$")
+    re_action = re.compile("^ACTION (PASSED|FAILED):\s+test$")
 
     for l in log:
-        m = re.match("^([A-Z_]+) STATUS:(\s*\d+)$", l)
-        if m:
-            stages.append(BuildStageResult(m.group(1), int(m.group(2).strip())))
-            if m.group(1) == "TEST":
-                test_seen = 1
-            continue
-        m = re.match("^ACTION (PASSED|FAILED):\s+test$", l)
-        if m and not test_seen:
-            if m.group(1) == "PASSED":
-                stages.append(BuildStageResult("TEST", 0))
-            else:
-                stages.append(BuildStageResult("TEST", 1))
-            continue
-
         if l.startswith("No space left on device"):
             ret.other_failures.add("disk full")
             continue
         if l.startswith("maximum runtime exceeded"):
             ret.other_failures.add("timeout")
             continue
-        m = re.match("^(PANIC|INTERNAL ERROR):.*$", l)
-        if m:
+        if l.startswith("PANIC:") or l.startswith("INTERNAL ERROR:"):
             ret.other_failures.add("panic")
             continue
         if l.startswith("testsuite-failure: ") or l.startswith("testsuite-error: "):
@@ -141,6 +128,19 @@ def build_status_from_logs(log, err):
         if l.startswith("testsuite-success: "):
             test_successes += 1
             continue
+        m = re_status.match(l)
+        if m:
+            stages.append(BuildStageResult(m.group(1), int(m.group(2).strip())))
+            if m.group(1) == "TEST":
+                test_seen = 1
+            continue
+        m = re_action.match(l)
+        if m and not test_seen:
+            if m.group(1) == "PASSED":
+                stages.append(BuildStageResult("TEST", 0))
+            else:
+                stages.append(BuildStageResult("TEST", 1))
+            continue
 
     # Scan err file for specific errors
     for l in err:


-- 
build.samba.org


More information about the samba-cvs mailing list