public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] validate_failures.py: also ignore .git
@ 2012-12-04  9:24 Bernhard Reutner-Fischer
  2012-12-04 13:54 ` Diego Novillo
  0 siblings, 1 reply; 8+ messages in thread
From: Bernhard Reutner-Fischer @ 2012-12-04  9:24 UTC (permalink / raw)
  To: Diego Novillo; +Cc: Bernhard Reutner-Fischer, gcc-patches

contrib/ChangeLog:

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.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
 contrib/testsuite-management/validate_failures.py |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py
index 7844cb0..280fd23 100755
--- a/contrib/testsuite-management/validate_failures.py
+++ b/contrib/testsuite-management/validate_failures.py
@@ -194,11 +194,8 @@ def IsInterestingResult(line):
     return False
   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 ParseSummary(sum_fname):
@@ -240,8 +237,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))
-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-06 16:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-04  9:24 [PATCH] validate_failures.py: also ignore .git Bernhard Reutner-Fischer
2012-12-04 13:54 ` Diego Novillo
2012-12-05  7:35   ` Bernhard Reutner-Fischer
2012-12-06 18:12     ` [PATCH] validate_failures.py: Fix performance regression Bernhard Reutner-Fischer
2012-12-07 15:32       ` Diego Novillo
2012-12-13 15:12         ` Bernhard Reutner-Fischer
2012-12-17 15:09           ` Diego Novillo
2013-02-06 16:56         ` Bernhard Reutner-Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).