aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2012-07-19 10:35:18 -0400
committerDiego Novillo <dnovillo@gcc.gnu.org>2012-07-19 10:35:18 -0400
commit29476fe16250a88853c906020e3e0a4798420918 (patch)
tree4a70bce2b2fe2426062cd251190386021f731bf3 /contrib
parent65e7bfe359febac74ebd3de0c36e735166205950 (diff)
downloadgcc-29476fe16250a88853c906020e3e0a4798420918.zip
gcc-29476fe16250a88853c906020e3e0a4798420918.tar.gz
gcc-29476fe16250a88853c906020e3e0a4798420918.tar.bz2
Fix --produce_manifest flag in validate_failures.py.
When I added the functionality to use other summary files for reporting, I broke the generation of manifests. When sum files are passed on, we need to use the list. Otherwise, we need to find summary files in the build directory. This patch factors out that logic into a new function and calls it from both the reporting and generation routines. Committed to trunk. * testsuite-management/validate_failures.py (CollectSumFiles): Rename from GetSumFiles. (GetSumFiles): Factor out of CheckExpectedResults. (CheckExpectedResults): Call it. (ProduceManifest): Call it. From-SVN: r189662
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ChangeLog8
-rwxr-xr-xcontrib/testsuite-management/validate_failures.py23
2 files changed, 22 insertions, 9 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index cc65b77..ee68edb 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,11 @@
+2012-07-19 Diego Novillo <dnovillo@google.com>
+
+ * testsuite-management/validate_failures.py (CollectSumFiles):
+ Rename from GetSumFiles.
+ (GetSumFiles): Factor out of CheckExpectedResults.
+ (CheckExpectedResults): Call it.
+ (ProduceManifest): Call it.
+
2012-07-18 Diego Novillo <dnovillo@google.com>
* testsuite-management/validate_failures.py: Fix
diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py
index b2c52fc..c48e4c3 100755
--- a/contrib/testsuite-management/validate_failures.py
+++ b/contrib/testsuite-management/validate_failures.py
@@ -195,7 +195,7 @@ def GetManifest(manifest_name):
return set()
-def GetSumFiles(builddir):
+def CollectSumFiles(builddir):
sum_files = []
for root, dirs, files in os.walk(builddir):
if '.svn' in dirs:
@@ -255,6 +255,16 @@ def PrintSummary(msg, summary):
print result
+def GetSumFiles(results, build_dir):
+ if not results:
+ print 'Getting actual results from build'
+ sum_files = CollectSumFiles(build_dir)
+ else:
+ print 'Getting actual results from user-provided results'
+ sum_files = results.split()
+ return sum_files
+
+
def CheckExpectedResults(options):
if not options.manifest:
(srcdir, target, valid_build) = GetBuildData(options)
@@ -268,13 +278,7 @@ def CheckExpectedResults(options):
print 'Manifest: %s' % manifest_name
manifest = GetManifest(manifest_name)
-
- if not options.results:
- print 'Getting actual results from build'
- sum_files = GetSumFiles(options.build_dir)
- else:
- print 'Getting actual results from user-provided results'
- sum_files = options.results.split()
+ sum_files = GetSumFiles(options.results, options.build_dir)
actual = GetResults(sum_files)
if options.verbosity >= 1:
@@ -311,7 +315,8 @@ def ProduceManifest(options):
Error('Manifest file %s already exists.\nUse --force to overwrite.' %
manifest_name)
- actual = GetResults(options.build_dir)
+ sum_files = GetSumFiles(options.results, options.build_dir)
+ actual = GetResults(sum_files)
with open(manifest_name, 'w') as manifest_file:
for result in sorted(actual):
print result