+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.
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
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
_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