OSDN Git Service

* gcc.misc-tests/linkage.exp: Prepend directory name to pass/fail
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Nov 2004 18:00:30 +0000 (18:00 +0000)
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Nov 2004 18:00:30 +0000 (18:00 +0000)
message, delete generated files, use more descriptive name for
executable, and make the test unsupported when it cannot be run.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90487 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.misc-tests/linkage.exp

index f0f8dda..aea8f21 100644 (file)
@@ -1,5 +1,9 @@
 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.
        (dg-require-weak, dg-require-visibility, dg-require-alias,
        dg-require-gc-sections, dg-require-profiling, dg-require-dll,
        * lib/gcc-dg.exp (skip_test_and_clear_xfail): New procedure.
        (dg-require-weak, dg-require-visibility, dg-require-alias,
        dg-require-gc-sections, dg-require-profiling, dg-require-dll,
index 9c8936d..7d4f8e9 100644 (file)
@@ -21,7 +21,7 @@
 if [isnative] then {
     set lines [gcc_target_compile "$srcdir/$subdir/linkage-x.c" "linkage-x.o" object {additional_flags="-w"}]
     if ![string match "" $lines] then {
 if [isnative] then {
     set lines [gcc_target_compile "$srcdir/$subdir/linkage-x.c" "linkage-x.o" object {additional_flags="-w"}]
     if ![string match "" $lines] then {
-       fail "linkage.c"
+       fail "$subdir/linkage.c compile"
     } else {
        # This is a completely bogus test. Sorry.
 
     } else {
        # This is a completely bogus test. Sorry.
 
@@ -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"
        catch { exec cc -c $native_cflags "$srcdir/$subdir/linkage-y.c" >&/dev/null }
        if ![file exists "linkage-y.o"] then {
        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 }
        if ![file exists "linkage-y.o"] then {
@@ -73,12 +75,17 @@ if [isnative] then {
            catch { exec c89 -c $native_cflags "$srcdir/$subdir/linkage-y.c" >&/dev/null }
        }
        if [file exists "linkage-y.o"] then {
            catch { exec c89 -c $native_cflags "$srcdir/$subdir/linkage-y.c" >&/dev/null }
        }
        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"
     }
 }
     }
 }