validate_failures.py: also ignore .git
authorBernhard Reutner-Fischer <aldot@gcc.gnu.org>
Wed, 5 Dec 2012 07:34:17 +0000 (08:34 +0100)
committerBernhard Reutner-Fischer <aldot@gcc.gnu.org>
Wed, 5 Dec 2012 07:34:17 +0000 (08:34 +0100)
2012-12-01  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>

* testsuite-management/validate_failures.py
(IsInterestingResult): Only strip line a second time if we did split.
Rephrase return statement while at it.
(CollectSumFiles): Also ignore .git directory.

From-SVN: r194182

contrib/ChangeLog
contrib/testsuite-management/validate_failures.py

index f7fee0e871b84e9afd7febe98f648ed113a3f302..6bb903cecfc60164010bc02d6d79c32a2a7e2733 100644 (file)
@@ -1,3 +1,10 @@
+2012-12-01  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
+
+       * testsuite-management/validate_failures.py
+       (IsInterestingResult): Only strip line a second time if we did split.
+       Rephrase return statement while at it.
+       (CollectSumFiles): Also ignore .git directory.
+
 2012-12-03  Diego Novillo  <dnovillo@google.com>
 
        * testsuite-management/validate_failures.py: Fix stale
index d02b575a3d638e10b23405009cdff8aec1953c14..ec51de91b6b1107d88acc8a1b7451df2413fb1ef 100755 (executable)
@@ -209,11 +209,8 @@ def IsInterestingResult(line):
   """Return True if line is one of the summary lines we care about."""
   if '|' in line:
     (_, line) = line.split('|', 1)
-  line = line.strip()
-  for result in _VALID_TEST_RESULTS:
-    if line.startswith(result):
-      return True
-  return False
+    line = line.strip()
+  return any(line.startswith(result) for result in _VALID_TEST_RESULTS)
 
 
 def IsInclude(line):
@@ -307,8 +304,9 @@ def GetManifest(manifest_path):
 def CollectSumFiles(builddir):
   sum_files = []
   for root, dirs, files in os.walk(builddir):
-    if '.svn' in dirs:
-      dirs.remove('.svn')
+    for ignored in ('.svn', '.git'):
+      if ignored in dirs:
+        dirs.remove(ignored)
     for fname in files:
       if fname.endswith('.sum'):
         sum_files.append(os.path.join(root, fname))