diff mbox

Use target_alias in validate_failures.py

Message ID yddhawkx8zj.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth April 16, 2012, 10:32 a.m. UTC
When I tried contrib/testsuite-management/validate_failures.py for the
first time this weekend, I ran into the following problem: while it
works fine for a i386-pc-solaris2.11 bootstrap, it fails instead for a
amd64-pc-solaris2.11 bootstrap:

      error: 11-gcc-64/build is not a valid GCC top level build directory.

The problem is that while the toplevel Makefile has

target=x86_64-pc-solaris2.11

the build was configured with --target=amd64-pc-solaris2.11 and the
target libraries live below the amd64-pc-solaris2.11, using the target
alias instead of the canonical target name.  Therefore the script thould
use

target_alias=amd64-pc-solaris2.11

to work in such a case.

The following patch does just that.

Ok for mainline?

Btw., it occured to me that it might be useful to add an option to
locate out-of-tree manifests.  I often have several source trees
(unmodified sources, ones with local patches) and would like to share
manifests between them.  While this can be achieved with symlinks, a
--manifest_dir or similar option might be an alternative.  Thoughts?

	Rainer


2012-04-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* testsuite-management/validate_failures.py (GetBuildData): Use
	target_alias.

Comments

Diego Novillo April 16, 2012, 2:07 p.m. UTC | #1
On 4/16/12 7:32 AM, Rainer Orth wrote:

> Btw., it occured to me that it might be useful to add an option to
> locate out-of-tree manifests.  I often have several source trees
> (unmodified sources, ones with local patches) and would like to share
> manifests between them.  While this can be achieved with symlinks, a
> --manifest_dir or similar option might be an alternative.  Thoughts?

That would be fantastic.  This is not the first time someone requests 
this, but I've never gotten around to implementing it.  The only thing 
there is that multiple manifests means that versioning needs to be 
handled externally to the script.  But that's not a big deal.

> 2012-04-15  Rainer Orth<ro@CeBiTec.Uni-Bielefeld.DE>
>
> 	* testsuite-management/validate_failures.py (GetBuildData): Use
> 	target_alias.

OK.


Diego.
Rainer Orth April 17, 2012, 5:07 p.m. UTC | #2
Diego Novillo <dnovillo@google.com> writes:

> On 4/16/12 7:32 AM, Rainer Orth wrote:
>
>> Btw., it occured to me that it might be useful to add an option to
>> locate out-of-tree manifests.  I often have several source trees
>> (unmodified sources, ones with local patches) and would like to share
>> manifests between them.  While this can be achieved with symlinks, a
>> --manifest_dir or similar option might be an alternative.  Thoughts?
>
> That would be fantastic.  This is not the first time someone requests this,
> but I've never gotten around to implementing it.  The only thing there is
> that multiple manifests means that versioning needs to be handled
> externally to the script.  But that's not a big deal.

Indeed, but the advantage is that people can choose whatever naming
scheme they like for the different manifests instead of implementing
some (probably limited) scheme inside validate_failures.py.

I'll give it a whirl, but probably only in early May, once I return from
a trip to California.

	Rainer
diff mbox

Patch

# HG changeset patch
# Parent 84699f134dedb823eb7ecde316543a2870d1b47a
Use target_alias in validate_failures.py

diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py
--- a/contrib/testsuite-management/validate_failures.py
+++ b/contrib/testsuite-management/validate_failures.py
@@ -5,7 +5,7 @@ 
 
 # Contributed by Diego Novillo <dnovillo@google.com>
 #
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -241,7 +241,7 @@  def CompareResults(manifest, actual):
 
 
 def GetBuildData(options):
-  target = GetMakefileValue('%s/Makefile' % options.build_dir, 'target=')
+  target = GetMakefileValue('%s/Makefile' % options.build_dir, 'target_alias=')
   srcdir = GetMakefileValue('%s/Makefile' % options.build_dir, 'srcdir =')
   if not ValidBuildDirectory(options.build_dir, target):
     Error('%s is not a valid GCC top level build directory.' %