diff options
author | fche <fche> | 2008-02-13 03:33:18 +0000 |
---|---|---|
committer | fche <fche> | 2008-02-13 03:33:18 +0000 |
commit | 4bab8964266929ec9356590db0d0fe51607c4b6b (patch) | |
tree | 991aac2cdd5f0508a5857fa72623524017475070 /testsuite/systemtap.context/context.exp | |
parent | 21beacc9a00ea48763048151c370e205c5f23379 (diff) | |
download | systemtap-steved-4bab8964266929ec9356590db0d0fe51607c4b6b.tar.gz systemtap-steved-4bab8964266929ec9356590db0d0fe51607c4b6b.tar.xz systemtap-steved-4bab8964266929ec9356590db0d0fe51607c4b6b.zip |
2008-02-12 Frank Ch. Eigler <fche@elastic.org>
* systemtap.context/context.exp: Build temporary modules under
build tree, to tolerate read-only source trees.
* {args,backtrace,pid}.tcl: Corresponding changes.
* systemtap_test_module2.c: Add a bunch of asm("")'s to prevent
inlining even better than noinline does.
Diffstat (limited to 'testsuite/systemtap.context/context.exp')
-rw-r--r-- | testsuite/systemtap.context/context.exp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/testsuite/systemtap.context/context.exp b/testsuite/systemtap.context/context.exp index 472609f7..11c0f2fc 100644 --- a/testsuite/systemtap.context/context.exp +++ b/testsuite/systemtap.context/context.exp @@ -21,20 +21,21 @@ proc cleanup {} { proc build_modules {} { global build_dir + global srcdir subdir if {[catch {exec mktemp -d staptestXXXXX} build_dir]} { puts stderr "Failed to create temporary directory: $build_dir" return 0 } - foreach f [glob systemtap_test_module*.c] { + foreach f [glob $srcdir/$subdir/systemtap_test_module*.c] { exec cp $f $build_dir } set old_dir [pwd] cd $build_dir foreach n {2 1} { - exec cp $old_dir/makefile$n Makefile + exec cp $srcdir/$subdir/makefile$n Makefile if {[catch {exec make clean} res]} { puts $res cd $old_dir @@ -61,7 +62,13 @@ proc build_modules {} { } # first build the modules -cd $srcdir/$subdir + +# NB: We cannot "cd" on behalf the whole dejagnu process, especially +# without going back to the build tree, and especially not to the +# source tree expecting to be able to write there. +# +# cd $srcdir/$subdir + set uname [exec /bin/uname -r] if {[build_modules] == 0} { @@ -73,7 +80,7 @@ if {[build_modules] == 0} { } foreach test $testlist { - source $test.tcl + source $srcdir/$subdir/$test.tcl } cleanup |