# host:
# If set, only run this test on hosts matching the given glob.
#
+# wrapper:
+# Wrap invocations of LOOKUP in this command. (Useful for valgrind
+# invocations, etc.)
+#
# Each option may occur at most once unless otherwise mentioned.
#
# After the option lines come regexp lines. run_lookup_test calls
set opts(xfail) {}
set opts(no_cross) {}
set opts(host) {}
+ set opts(wrapper) {}
foreach i $opt_array {
set opt_name [lindex $i 0]
}
}
- # Invoke the lookup program on the outputs.
+ # Invoke the lookup program on the outputs, possibly through the wrapper.
- set results [run_host_cmd tmpdir/lookup $lookup_output]
+ if { [llength $opts(wrapper)] == 0 } {
+ set results [run_host_cmd tmpdir/lookup $lookup_output]
+ } else {
+ set results [run_host_cmd "$opts(wrapper) tmpdir/lookup" $lookup_output]
+ }
set f [open "tmpdir/lookup.out" "w"]
puts $f $results