aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorJacob Bachmeyer <jcb@gnu.org>2020-11-10 21:16:51 -0600
committerJacob Bachmeyer <jcb@gnu.org>2020-11-10 21:16:51 -0600
commit2d7309f6ec752d0c5269d2a728911d33a48895b8 (patch)
tree1495cb46ec7743163bae026d9df612496d2db7e8 /testsuite
parent650af6e75776a52afa4803d02aae0f923a9ec82f (diff)
downloaddejagnu-2d7309f6ec752d0c5269d2a728911d33a48895b8.zip
dejagnu-2d7309f6ec752d0c5269d2a728911d33a48895b8.tar.gz
dejagnu-2d7309f6ec752d0c5269d2a728911d33a48895b8.tar.bz2
Abstract linking test items in launcher testsuite
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/launcher.all/command.exp16
-rw-r--r--testsuite/lib/launcher.exp8
2 files changed, 14 insertions, 10 deletions
diff --git a/testsuite/launcher.all/command.exp b/testsuite/launcher.all/command.exp
index 9e21237..6c400f0 100644
--- a/testsuite/launcher.all/command.exp
+++ b/testsuite/launcher.all/command.exp
@@ -178,17 +178,13 @@ set tests {
# This must be done at run-time in the build directory because symbolic
# links are not allowed in GNU source tarballs.
-catch {
- file link -symbolic \
- [testsuite file -object -test command share dejagnu commands] \
- [testsuite file -source -test command commands]
-}
+link_dejagnu_launcher_test_item \
+ [testsuite file -object -test command share dejagnu commands] \
+ [testsuite file -source -test command commands]
foreach alias_item $tests {
- catch {
- file link -symbolic \
- [testsuite file -object -test command bin [lindex $alias_item 0]] \
- $LAUNCHER
- }
+ link_dejagnu_launcher_test_item \
+ [testsuite file -object -test command bin [lindex $alias_item 0]] \
+ $LAUNCHER
}
if { ![file exists \
[testsuite file -object -test command share dejagnu commands]] } {
diff --git a/testsuite/lib/launcher.exp b/testsuite/lib/launcher.exp
index 42dc144..84a392f 100644
--- a/testsuite/lib/launcher.exp
+++ b/testsuite/lib/launcher.exp
@@ -75,6 +75,14 @@ proc try_dejagnu_launcher { launcher test } {
}
}
+proc link_dejagnu_launcher_test_item {link target} {
+ verbose -log "linking $link"
+ verbose -log " to $target"
+ if {[catch {file link -symbolic $link $target} err]} {
+ perror $err 0
+ }
+}
+
proc run_dejagnu_launcher_tests { launcher tests } {
foreach test $tests {
if { [lindex $test 0] == "#" } {