diff options
Diffstat (limited to 'testsuite/lib')
-rw-r--r-- | testsuite/lib/compile.exp | 25 | ||||
-rw-r--r-- | testsuite/lib/default-nt-names.exp | 20 | ||||
-rw-r--r-- | testsuite/lib/nsswitch-config.exp | 21 |
3 files changed, 60 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 } } diff --git a/testsuite/lib/default-nt-names.exp b/testsuite/lib/default-nt-names.exp new file mode 100644 index 0000000000..5d01d2a5bb --- /dev/null +++ b/testsuite/lib/default-nt-names.exp @@ -0,0 +1,20 @@ +# +# A list of default domain/local users/groups. Unfortunately this is tied +# to the English language version of Windows NT. +# + +global domain + +# Domain users and groups + +set domain_users [list "$domain/Administrator" "$domain/Guest"] + +set domain_groups [list "$domain/Domain Admins" "$domain/Domain Guests" \ + "$domain/Domain Users"] + +# Local groups + +set local_groups [list "BUILTIN/Replicator" "BUILTIN/Server Operators" \ + "BUILTIN/Account Operators" "BUILTIN/Backup Operators" \ + "BUILTIN/Print Operators" "BUILTIN/Guests" "BUILTIN/Users" \ + "BUILTIN/Administrators"] diff --git a/testsuite/lib/nsswitch-config.exp b/testsuite/lib/nsswitch-config.exp new file mode 100644 index 0000000000..38342685df --- /dev/null +++ b/testsuite/lib/nsswitch-config.exp @@ -0,0 +1,21 @@ +# +# Load environment variables +# + +global tool + +if { [file exists "deja-$tool.tcl"] } { + source "deja-$tool.tcl" +} + +# Required options + +if { ![info exists WORKGROUP] } { + error "\$WORKGROUP not set in config file" +} + +if { ![info exists PDC] } { + error "\$PDC not set in config file" +} + +set domain $WORKGROUP |