aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-07-08 08:27:39 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2023-06-14 14:29:46 +0000
commitfebe56cb34dc6d9d23ee69bcd531e3b4e9d98098 (patch)
treea226ed2495054a9dc76c59414855463753c81180 /contrib
parent5f8cc7f00cdf9127a9c16adecb98fdb2f3eeba82 (diff)
downloadgcc-febe56cb34dc6d9d23ee69bcd531e3b4e9d98098.zip
gcc-febe56cb34dc6d9d23ee69bcd531e3b4e9d98098.tar.gz
gcc-febe56cb34dc6d9d23ee69bcd531e3b4e9d98098.tar.bz2
[contrib] validate_failures.py: Simplify GetManifestPath()
... and don't require a valid build directory when no data from it is necessary. contrib/ChangeLog: * testsuite-management/validate_failures.py: Simplify GetManifestPath().
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/testsuite-management/validate_failures.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py
index 4733dd8..1bd09e0 100755
--- a/contrib/testsuite-management/validate_failures.py
+++ b/contrib/testsuite-management/validate_failures.py
@@ -457,7 +457,7 @@ def CompareResults(manifest, actual):
return actual_vs_manifest, manifest_vs_actual
-def GetManifestPath(srcdir, target, user_provided_must_exist):
+def GetManifestPath(user_provided_must_exist):
"""Return the full path to the manifest file."""
manifest_path = _OPTIONS.manifest
if manifest_path:
@@ -465,6 +465,7 @@ def GetManifestPath(srcdir, target, user_provided_must_exist):
Error('Manifest does not exist: %s' % manifest_path)
return manifest_path
else:
+ (srcdir, target) = GetBuildData()
if not srcdir:
Error('Could not determine the location of GCC\'s source tree. '
'The Makefile does not contain a definition for "srcdir".')
@@ -530,8 +531,7 @@ def PerformComparison(expected, actual, ignore_missing_failures):
def CheckExpectedResults():
- srcdir, target = GetBuildData()
- manifest_path = GetManifestPath(srcdir, target, True)
+ manifest_path = GetManifestPath(True)
print('Manifest: %s' % manifest_path)
manifest = GetManifest(manifest_path)
sum_files = GetSumFiles(_OPTIONS.results, _OPTIONS.build_dir)
@@ -545,8 +545,7 @@ def CheckExpectedResults():
def ProduceManifest():
- (srcdir, target) = GetBuildData()
- manifest_path = GetManifestPath(srcdir, target, False)
+ manifest_path = GetManifestPath(False)
print('Manifest: %s' % manifest_path)
if os.path.exists(manifest_path) and not _OPTIONS.force:
Error('Manifest file %s already exists.\nUse --force to overwrite.' %
@@ -563,15 +562,13 @@ def ProduceManifest():
def CompareBuilds():
- (srcdir, target) = GetBuildData()
-
sum_files = GetSumFiles(_OPTIONS.results, _OPTIONS.build_dir)
actual = GetResults(sum_files)
clean = ResultSet()
if _OPTIONS.manifest:
- manifest_path = GetManifestPath(srcdir, target, True)
+ manifest_path = GetManifestPath(True)
print('Manifest: %s' % manifest_path)
clean = GetManifest(manifest_path)