validate_failures.py: also ignore .git

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
parent 3eb9e389
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> 2012-12-03 Diego Novillo <dnovillo@google.com>
* testsuite-management/validate_failures.py: Fix stale * testsuite-management/validate_failures.py: Fix stale
......
...@@ -209,11 +209,8 @@ def IsInterestingResult(line): ...@@ -209,11 +209,8 @@ def IsInterestingResult(line):
"""Return True if line is one of the summary lines we care about.""" """Return True if line is one of the summary lines we care about."""
if '|' in line: if '|' in line:
(_, line) = line.split('|', 1) (_, line) = line.split('|', 1)
line = line.strip() line = line.strip()
for result in _VALID_TEST_RESULTS: return any(line.startswith(result) for result in _VALID_TEST_RESULTS)
if line.startswith(result):
return True
return False
def IsInclude(line): def IsInclude(line):
...@@ -307,8 +304,9 @@ def GetManifest(manifest_path): ...@@ -307,8 +304,9 @@ def GetManifest(manifest_path):
def CollectSumFiles(builddir): def CollectSumFiles(builddir):
sum_files = [] sum_files = []
for root, dirs, files in os.walk(builddir): for root, dirs, files in os.walk(builddir):
if '.svn' in dirs: for ignored in ('.svn', '.git'):
dirs.remove('.svn') if ignored in dirs:
dirs.remove(ignored)
for fname in files: for fname in files:
if fname.endswith('.sum'): if fname.endswith('.sum'):
sum_files.append(os.path.join(root, fname)) sum_files.append(os.path.join(root, fname))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment