X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=ld%2Ftestsuite%2Fld-cris%2Fcris.exp;fp=ld%2Ftestsuite%2Fld-cris%2Fcris.exp;h=2278dabfbc187db50dae49f5afc8a9aa83494f5a;hb=2121e504cdb27044b0a391abb510400d2d5053df;hp=296f703363789bf05667b7e9ec42e4a825f8719c;hpb=f5ae7ed80bdfd8e6eee2c4c3ac6bb0df89fa6e90;p=pf3gnuchains%2Fpf3gnuchains4x.git diff --git a/ld/testsuite/ld-cris/cris.exp b/ld/testsuite/ld-cris/cris.exp index 296f703363..2278dabfbc 100644 --- a/ld/testsuite/ld-cris/cris.exp +++ b/ld/testsuite/ld-cris/cris.exp @@ -23,8 +23,33 @@ if ![istarget cris-*-*] { } set rd_test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] + +# First, execute those tests that are named to indicate that they create a +# DSO. Copy the file from the run_dump_test "tmpdir/dump" to a unique +# expected name. +# FIXME: Add option "output: filename" to run_dump_test. +# FIXME: Add option "ldtail: option" to run_dump_test, so we can link +# libraries in the right order. +foreach atest $rd_test_list { + # We need to check against runtest_file_p too, or we'd mindlessly copy + # the last tmpdir/dump in selective test-runs. + if { [string match $srcdir/$subdir/*dso-*.d $atest] \ + && [runtest_file_p $runtests [file tail $atest]] } { + verbose [file rootname $atest] + run_dump_test [file rootname $atest] + set cmd "cp tmpdir/dump tmpdir/[file rootname [file tail $atest]].so" + send_log "$cmd\n" + set cmdret [catch "exec $cmd" comp_output] + send_log "$comp_output\n" + # FIXME: What if it fails? Need we do something? + } +} + +# Then run the ordinary tests. This round, exclude the dso-* tests. foreach atest $rd_test_list { # We need to strip the ".d", but can leave the dirname. - verbose [file rootname $atest] - run_dump_test [file rootname $atest] + if { ! [string match $srcdir/$subdir/*dso-*.d $atest] } { + verbose [file rootname $atest] + run_dump_test [file rootname $atest] + } }