Message ID | 1354613050-30655-1-git-send-email-rep.dot.nop@gmail.com |
---|---|
State | New |
Headers | show |
On Tue, Dec 4, 2012 at 4:24 AM, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote: > 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. OK. Diego.
On Tue, Dec 04, 2012 at 08:53:50AM -0500, Diego Novillo wrote: >On Tue, Dec 4, 2012 at 4:24 AM, Bernhard Reutner-Fischer ><rep.dot.nop@gmail.com> wrote: >> 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. > >OK. applied to trunk as r194182 thanks!
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))
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(-)