summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.syscall/test.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.syscall/test.tcl')
-rwxr-xr-xtestsuite/systemtap.syscall/test.tcl11
1 files changed, 10 insertions, 1 deletions
diff --git a/testsuite/systemtap.syscall/test.tcl b/testsuite/systemtap.syscall/test.tcl
index e640db66..9d620d74 100755
--- a/testsuite/systemtap.syscall/test.tcl
+++ b/testsuite/systemtap.syscall/test.tcl
@@ -46,10 +46,19 @@ proc run_one_test {filename flags bits} {
set sys_prog "[file dirname [file normalize $filename]]/sys.stp"
set cmd "stap --skip-badvars -c $dir/${testname} ${sys_prog}"
+ # Extract additional C flags needed to compile
+ set add_flags ""
+ foreach i $flags {
+ if [regexp "^additional_flags=" $i] {
+ regsub "^additional_flags=" $i "" tmp
+ append add_flags " $tmp"
+ }
+ }
+
# Extract the expected results
# Use the preprocessor so we can ifdef tests in and out
- set ccmd "gcc -E -C -P $filename"
+ set ccmd "gcc -E -C -P $add_flags $filename"
# XXX: but note, this will expand all system headers too!
catch {eval exec $ccmd} output