This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Don't use -o ./a.out in the gcc testsuite.
- To: mike stump <mrs at windriver dot com>
- Subject: Re: PATCH: Don't use -o ./a.out in the gcc testsuite.
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Wed, 17 Oct 2001 11:24:03 -0700
- Cc: tprince at computer dot org, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- References: <200110171810.LAA10636@kankakee.wrs.com>
On Wed, Oct 17, 2001 at 11:10:52AM -0700, mike stump wrote:
> > Date: Wed, 17 Oct 2001 10:30:57 -0700
> > From: "H . J . Lu" <hjl@lucon.org>
> > To: Tim Prince <tprince@computer.org>
> > Cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org
>
> > How about this patch? Tested on Linux/x86.
>
> While I have no official status to ok this, the patch looks good to
> me.
>
> The only danger is, the ./a.out's should be transformed to ./foo.exe
> names, not foo.exe names, to retain the `sameness'. The ./ is not
> without meaning, if . isn't `soon' enough in the path and the name is
> used to run the testcase.
>
> > - set output_file "./a.out"
> > + set output_file "[file rootname [file tail $prog]].exe"
>
> Fixing this after the fact tends to be fairly obscure.
Here is the new one. Tested on Linux/x86.
H.J.
----
2001-10-17 H.J. Lu <hjl@gnu.org>
* g++.dg/special/ecos.exp: Append .exe instead of a.out as the
link output.
* gcc.dg/special/ecos.exp: Likewise.
* lib/g++-dg.exp: Likewise.
* lib/g77-dg.exp: Likewise.
* lib/gcc-dg.exp : Likewise.
* lib/mike-g++.exp: Likewise.
* lib/mike-g77.exp: Likewise.
* lib/mike-gcc.exp: Likewise.
* lib/objc-dg.exp: Likewise.
--- gcc/testsuite/g++.dg/special/ecos.exp.a.out Tue Aug 21 10:33:36 2001
+++ gcc/testsuite/g++.dg/special/ecos.exp Wed Oct 17 08:51:46 2001
@@ -29,15 +29,15 @@ load_lib g++-dg.exp
###########
dg-init
-set lines [g++_target_compile "$srcdir/$subdir/conpr-1.C" "$objdir/a.out" executable ""]
+set lines [g++_target_compile "$srcdir/$subdir/conpr-1.C" "$objdir/conpr-1.exe" executable ""]
if [string match "*init_priority*" $lines] then {
xfail "conpr-1.C"
- file delete $objdir/a.out
+ file delete $objdir/conpr-1.exe
} elseif ![string match "" $lines] then {
fail "conpr-1.C"
} else {
dg-runtest "$srcdir/$subdir/conpr-1.C" "" ""
- file delete $objdir/a.out
+ file delete $objdir/conpr-1.exe
}
dg-finish
@@ -89,15 +89,15 @@ dg-finish
###########
dg-init
-set lines [g++_target_compile "$srcdir/$subdir/initp1.C" "$objdir/a.out" executable ""]
+set lines [g++_target_compile "$srcdir/$subdir/initp1.C" "$objdir/initp1.exe" executable ""]
if [string match "*init_priority*" $lines] then {
xfail "initp1.C"
- file delete $objdir/a.out
+ file delete $objdir/initp1.exe
} elseif ![string match "" $lines] then {
fail "initp1.C"
} else {
dg-runtest "$srcdir/$subdir/initp1.C" "" ""
- file delete $objdir/a.out
+ file delete $objdir/initp1.exe
}
dg-finish
--- gcc/testsuite/gcc.dg/special/ecos.exp.a.out Wed Jan 17 18:30:03 2001
+++ gcc/testsuite/gcc.dg/special/ecos.exp Wed Oct 17 09:55:56 2001
@@ -118,7 +118,7 @@ if { [ check_weak_available ] == 1 } {
set lines [gcc_target_compile "$srcdir/$subdir/wkali-2b.c" "wkali-2b.o" object ""]
if [string match "*only weak aliases*" $lines] then {
xfail "wkali-2b.o"
- file delete $srcdir/$subdir/a.out
+ file delete $srcdir/$subdir/wkali-2.exe
} elseif ![string match "" $lines] then {
fail "wkali-2b.o"
} else {
--- gcc/testsuite/lib/g++-dg.exp.a.out Sun Jul 15 18:31:06 2001
+++ gcc/testsuite/lib/g++-dg.exp Wed Oct 17 10:41:28 2001
@@ -39,7 +39,7 @@ proc g++-dg-test { prog do_what extra_to
}
"link" {
set compile_type "executable"
- set output_file "a.out"
+ set output_file "[file rootname [file tail $prog]].exe"
# The following line is needed for targets like the i960 where
# the default output file is b.out. Sigh.
}
@@ -48,7 +48,7 @@ proc g++-dg-test { prog do_what extra_to
# FIXME: "./" is to cope with "." not being in $PATH.
# Should this be handled elsewhere?
# YES.
- set output_file "./a.out"
+ set output_file "./[file rootname [file tail $prog]].exe"
# This is the only place where we care if an executable was
# created or not. If it was, dg.exp will try to run it.
remote_file build delete $output_file;
--- gcc/testsuite/lib/g77-dg.exp.a.out Wed Aug 15 13:28:43 2001
+++ gcc/testsuite/lib/g77-dg.exp Wed Oct 17 10:41:47 2001
@@ -71,7 +71,7 @@ proc g77-dg-test { prog do_what extra_to
}
"link" {
set compile_type "executable"
- set output_file "a.out"
+ set output_file "[file rootname [file tail $prog]].exe"
# The following line is needed for targets like the i960 where
# the default output file is b.out. Sigh.
}
@@ -80,7 +80,7 @@ proc g77-dg-test { prog do_what extra_to
# FIXME: "./" is to cope with "." not being in $PATH.
# Should this be handled elsewhere?
# YES.
- set output_file "./a.out"
+ set output_file "./[file rootname [file tail $prog]].exe"
# This is the only place where we care if an executable was
# created or not. If it was, dg.exp will try to run it.
remote_file build delete $output_file;
--- gcc/testsuite/lib/gcc-dg.exp.a.out Sun Jul 15 18:31:06 2001
+++ gcc/testsuite/lib/gcc-dg.exp Wed Oct 17 10:42:00 2001
@@ -71,7 +71,7 @@ proc gcc-dg-test { prog do_what extra_to
}
"link" {
set compile_type "executable"
- set output_file "a.out"
+ set output_file "[file rootname [file tail $prog]].exe"
# The following line is needed for targets like the i960 where
# the default output file is b.out. Sigh.
}
@@ -80,7 +80,7 @@ proc gcc-dg-test { prog do_what extra_to
# FIXME: "./" is to cope with "." not being in $PATH.
# Should this be handled elsewhere?
# YES.
- set output_file "./a.out"
+ set output_file "./[file rootname [file tail $prog]].exe"
# This is the only place where we care if an executable was
# created or not. If it was, dg.exp will try to run it.
remote_file build delete $output_file;
--- gcc/testsuite/lib/mike-g++.exp.a.out Wed Feb 7 18:29:38 2001
+++ gcc/testsuite/lib/mike-g++.exp Wed Oct 17 09:05:31 2001
@@ -113,12 +113,12 @@ proc postbase { src_code run groups arg
link
{
set compile_type "executable";
- set output_file "$tmpdir/a.out";
+ append output_file ".exe";
}
run
{
set compile_type "executable";
- set output_file "$tmpdir/a.out";
+ append output_file ".exe";
set run yes;
}
default
--- gcc/testsuite/lib/mike-g77.exp.a.out Wed Dec 16 14:24:25 1998
+++ gcc/testsuite/lib/mike-g77.exp Wed Oct 17 09:05:45 2001
@@ -120,12 +120,12 @@ proc postbase { src_code run groups arg
link
{
set compile_type "executable";
- set output_file "$tmpdir/a.out";
+ append output_file ".exe";
}
run
{
set compile_type "executable";
- set output_file "$tmpdir/a.out";
+ append output_file ".exe";
set run yes;
}
default
--- gcc/testsuite/lib/mike-gcc.exp.a.out Wed Feb 7 18:29:38 2001
+++ gcc/testsuite/lib/mike-gcc.exp Wed Oct 17 09:06:01 2001
@@ -117,12 +117,12 @@ proc postbase { src_code run groups arg
link
{
set compile_type "executable";
- set output_file "$tmpdir/a.out";
+ append output_file ".exe";
}
run
{
set compile_type "executable";
- set output_file "$tmpdir/a.out";
+ append output_file ".exe";
set run yes;
}
default
--- gcc/testsuite/lib/objc-dg.exp.a.out Mon Jun 18 09:48:34 2001
+++ gcc/testsuite/lib/objc-dg.exp Wed Oct 17 10:42:19 2001
@@ -73,7 +73,7 @@ proc objc-dg-test { prog do_what extra_t
}
"link" {
set compile_type "executable"
- set output_file "a.out"
+ set output_file "[file rootname [file tail $prog]].exe"
# The following line is needed for targets like the i960 where
# the default output file is b.out. Sigh.
}
@@ -82,7 +82,7 @@ proc objc-dg-test { prog do_what extra_t
# FIXME: "./" is to cope with "." not being in $PATH.
# Should this be handled elsewhere?
# YES.
- set output_file "./a.out"
+ set output_file "./[file rootname [file tail $prog]].exe"
# This is the only place where we care if an executable was
# created or not. If it was, dg.exp will try to run it.
remote_file build delete $output_file;