aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.chill/callch.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.chill/callch.exp')
-rw-r--r--gdb/testsuite/gdb.chill/callch.exp25
1 files changed, 11 insertions, 14 deletions
diff --git a/gdb/testsuite/gdb.chill/callch.exp b/gdb/testsuite/gdb.chill/callch.exp
index 2c5b17e..158fb91 100644
--- a/gdb/testsuite/gdb.chill/callch.exp
+++ b/gdb/testsuite/gdb.chill/callch.exp
@@ -23,6 +23,16 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile "callch"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -54,17 +64,4 @@ proc do_tests {} {
gdb_test "call whitney(c)" "x.f1\\(FALSE, FALSE\\) = 1.*x.f1\\(FALSE, TRUE\\) = 1.*x.f1\\(TRUE, FALSE\\) = 1.*x.f1\\(TRUE, TRUE\\) = 1.*"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "callch.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests