summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-18 18:11:05 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-18 18:11:05 +0000
commit6f25227972527ea90b61de84b283d840dcc49004 (patch)
tree83ba0f79a71b9577f4fc47078b2395da26f7b410 /contrib
parent37a87e3499e8c1d22f8f2f7451ec9e5dc0094181 (diff)
downloadgcc-6f25227972527ea90b61de84b283d840dcc49004.tar.gz
Loosen check for build directory.
* validate_failures.py: Loosen check for build directory. State what failed if we couldn't find the source tree or the target triplet. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198064 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ChangeLog6
-rwxr-xr-xcontrib/testsuite-management/validate_failures.py19
2 files changed, 17 insertions, 8 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index c97ae95c3a8..3dd147be9e8 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,9 @@
+2013-04-18 Diego Novillo <dnovillo@google.com>
+
+ * validate_failures.py: Loosen check for build directory.
+ State what failed if we couldn't find the source tree or
+ the target triplet.
+
2013-03-22 Jakub Jelinek <jakub@redhat.com>
* gennews (files): Add files for GCC 4.8.
diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py
index 74dbcfb035c..aa71c940df9 100755
--- a/contrib/testsuite-management/validate_failures.py
+++ b/contrib/testsuite-management/validate_failures.py
@@ -196,11 +196,9 @@ def GetMakefileValue(makefile_name, value_name):
return None
-def ValidBuildDirectory(builddir, target):
+def ValidBuildDirectory(builddir):
if (not os.path.exists(builddir) or
- not os.path.exists('%s/Makefile' % builddir) or
- (not os.path.exists('%s/build-%s' % (builddir, target)) and
- not os.path.exists('%s/%s' % (builddir, target)))):
+ not os.path.exists('%s/Makefile' % builddir)):
return False
return True
@@ -362,14 +360,17 @@ def GetManifestPath(srcdir, target, user_provided_must_exist):
Error('Manifest does not exist: %s' % manifest_path)
return manifest_path
else:
- assert srcdir and target
+ if not srcdir:
+ Error('Could not determine where the location of GCC\'s source tree. '
+ 'The Makefile does not contain a definition for "srcdir".')
+ if not target:
+ Error('Could not determine the target triplet for this build. '
+ 'The Makefile does not contain a definition for "target_alias".')
return _MANIFEST_PATH_PATTERN % (srcdir, _MANIFEST_SUBDIR, target)
def GetBuildData():
- srcdir = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'srcdir =')
- target = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'target_alias=')
- if not ValidBuildDirectory(_OPTIONS.build_dir, target):
+ if not ValidBuildDirectory(_OPTIONS.build_dir):
# If we have been given a set of results to use, we may
# not be inside a valid GCC build directory. In that case,
# the user must provide both a manifest file and a set
@@ -380,6 +381,8 @@ def GetBuildData():
_OPTIONS.build_dir)
else:
return None, None
+ srcdir = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'srcdir =')
+ target = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'target_alias=')
print 'Source directory: %s' % srcdir
print 'Build target: %s' % target
return srcdir, target