aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-cris/cris.exp
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2002-01-31 10:42:18 +0000
committerHans-Peter Nilsson <hp@axis.com>2002-01-31 10:42:18 +0000
commitf7a2c2f698acd6554284d5e05a1f82724c306359 (patch)
treefd6e6d9055cc7ef95a0a49085deb3223edd2696d /ld/testsuite/ld-cris/cris.exp
parentc312a6a4894911fd22cc103702aeb333b6871964 (diff)
downloadgdb-f7a2c2f698acd6554284d5e05a1f82724c306359.zip
gdb-f7a2c2f698acd6554284d5e05a1f82724c306359.tar.gz
gdb-f7a2c2f698acd6554284d5e05a1f82724c306359.tar.bz2
* ld-cris/weakref1.d, ld-cris/libdso-1.d, ld-cris/gotrel2.s,
ld-cris/expdyn1.d, ld-cris/expdyn1.s, ld-cris/dso-1.s: New tests. * ld-cris/cris.exp: Split run_dump_tests in two parts, executing tests named *dso-*.d first and copying their tmpdir/dump to files named as the .d-file.
Diffstat (limited to 'ld/testsuite/ld-cris/cris.exp')
-rw-r--r--ld/testsuite/ld-cris/cris.exp29
1 files changed, 27 insertions, 2 deletions
diff --git a/ld/testsuite/ld-cris/cris.exp b/ld/testsuite/ld-cris/cris.exp
index 296f703..2278dab 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]
+ }
}