summaryrefslogtreecommitdiff
path: root/testsuite/lib/compile.exp
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-05-09 04:59:49 +0000
committerTim Potter <tpot@samba.org>2001-05-09 04:59:49 +0000
commitdcc39ea43984fe9f9c683e48423794793a923e28 (patch)
treecfccda702e3f50fa6da408c42937f1007abee49e /testsuite/lib/compile.exp
parent9de17c5c3892930d6d1d349df63e2c4206787ceb (diff)
downloadsamba-dcc39ea43984fe9f9c683e48423794793a923e28.tar.gz
samba-dcc39ea43984fe9f9c683e48423794793a923e28.tar.bz2
samba-dcc39ea43984fe9f9c683e48423794793a923e28.zip
Cleaned up bitrot in nsswitch testsuite. Merged tests across from TNG
branch. (This used to be commit acef477383e5739292e764c17cef87822a09f13b)
Diffstat (limited to 'testsuite/lib/compile.exp')
-rw-r--r--testsuite/lib/compile.exp25
1 files changed, 19 insertions, 6 deletions
diff --git a/testsuite/lib/compile.exp b/testsuite/lib/compile.exp
index 6e79d431ea..070498d958 100644
--- a/testsuite/lib/compile.exp
+++ b/testsuite/lib/compile.exp
@@ -23,6 +23,7 @@
# Compile a program consisting of one .c file. For example
# simple_compile "foo" will compile foo.c to the executable foo.exe
+# Use a second argument to specify link libraries.
proc simple_compile { args } {
global srcdir
@@ -31,8 +32,19 @@ proc simple_compile { args } {
# Compile up program
set program [lindex $args 0]
- set output [target_compile "$srcdir/$subdir/$program.c" \
- "$srcdir/$subdir/$program" executable {additional_flags="-g"}]
+ set libs [lindex $args 1]
+
+ if { $libs == "" } {
+
+ set output [target_compile "$srcdir/$subdir/$program.c" \
+ "$srcdir/$subdir/$program" executable \
+ {additional_flags="-g"}]
+ } else {
+
+ set output [target_compile "$srcdir/$subdir/$program.c" \
+ "$srcdir/$subdir/$program" executable \
+ [list libs=$libs additional_flags="-g"]]
+ }
# Check for errors
@@ -54,13 +66,14 @@ proc simple_make { args } {
set suffix [lindex $args 0]
set program [lindex $args 1]
- set output [system "make -C $srcdir/$subdir -f Makefile.$suffix $program"]
+ set output [util_start "make" \
+ "-C $srcdir/$subdir -f Makefile.$suffix $program"]
# Check for errors
if { [regexp "Error" $output] } {
- perror "make $program"
- puts $output
- return -1
+ perror "make $program"
+ puts $output
+ return -1
}
}