Commit af980752 by Janis Johnson Committed by Janis Johnson

linkage.exp: Prepend directory name to pass/fail message...

	* gcc.misc-tests/linkage.exp: Prepend directory name to pass/fail
	message, delete generated files, use more descriptive name for
	executable, and make the test unsupported when it cannot be run.

From-SVN: r90487
parent 5278e476
2004-11-11 Janis Johnson <janis187@us.ibm.com> 2004-11-11 Janis Johnson <janis187@us.ibm.com>
* gcc.misc-tests/linkage.exp: Prepend directory name to pass/fail
message, delete generated files, use more descriptive name for
executable, and make the test unsupported when it cannot be run.
* lib/gcc-dg.exp (skip_test_and_clear_xfail): New procedure. * lib/gcc-dg.exp (skip_test_and_clear_xfail): New procedure.
(dg-require-weak, dg-require-visibility, dg-require-alias, (dg-require-weak, dg-require-visibility, dg-require-alias,
dg-require-gc-sections, dg-require-profiling, dg-require-dll, dg-require-gc-sections, dg-require-profiling, dg-require-dll,
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
if [isnative] then { if [isnative] then {
set lines [gcc_target_compile "$srcdir/$subdir/linkage-x.c" "linkage-x.o" object {additional_flags="-w"}] set lines [gcc_target_compile "$srcdir/$subdir/linkage-x.c" "linkage-x.o" object {additional_flags="-w"}]
if ![string match "" $lines] then { if ![string match "" $lines] then {
fail "linkage.c" fail "$subdir/linkage.c compile"
} else { } else {
# This is a completely bogus test. Sorry. # This is a completely bogus test. Sorry.
...@@ -65,7 +65,9 @@ if [isnative] then { ...@@ -65,7 +65,9 @@ if [isnative] then {
} }
} }
catch { exec rm -f linkage-y.o } if [file exists "linkage-y.o"] then {
file delete "linkage-y.o"
}
send_log "cc -c $native_cflags $srcdir/$subdir/linkage-y.c >&/dev/null\n" send_log "cc -c $native_cflags $srcdir/$subdir/linkage-y.c >&/dev/null\n"
catch { exec cc -c $native_cflags "$srcdir/$subdir/linkage-y.c" >&/dev/null } catch { exec cc -c $native_cflags "$srcdir/$subdir/linkage-y.c" >&/dev/null }
if ![file exists "linkage-y.o"] then { if ![file exists "linkage-y.o"] then {
...@@ -73,12 +75,17 @@ if [isnative] then { ...@@ -73,12 +75,17 @@ if [isnative] then {
catch { exec c89 -c $native_cflags "$srcdir/$subdir/linkage-y.c" >&/dev/null } catch { exec c89 -c $native_cflags "$srcdir/$subdir/linkage-y.c" >&/dev/null }
} }
if [file exists "linkage-y.o"] then { if [file exists "linkage-y.o"] then {
set lines [gcc_target_compile "linkage-y.o linkage-x.o" "x" executable ""] set lines [gcc_target_compile "linkage-y.o linkage-x.o" "linkage.exe" executable ""]
if [string match "" $lines] then { if [string match "" $lines] then {
pass "linkage.c" pass "$subdir/linkage.c link"
file delete "linkage.exe"
} else { } else {
fail "linkage.c" fail "$subdir/linkage.c link"
} }
file delete "linkage-y.o"
} else {
unsupported "$subdir/linkage.c native compile failed"
} }
file delete "linkage-x.o"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment