diff options
author | Zachary T Welch <zwelch@codesourcery.com> | 2010-11-05 15:03:01 -0700 |
---|---|---|
committer | Joe Damato <ice799@gmail.com> | 2010-11-28 20:08:00 -0800 |
commit | 4627fc493db8459e6ef0597a4155a06b7d120d20 (patch) | |
tree | 812c0a31c6554878f067447216ce64d98bf29c77 /testsuite/ltrace.minor/trace-exec.exp | |
parent | 3a9d1e753b6228347fc04c1f0a7a7fbb7147ec9a (diff) | |
download | ltrace-4627fc493db8459e6ef0597a4155a06b7d120d20.tar.gz |
Make test suite work for out-of-tree builds.
Use 'objdir' instead of 'srcdir' for building executables and saving
the .ltrace output files.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
Diffstat (limited to 'testsuite/ltrace.minor/trace-exec.exp')
-rw-r--r-- | testsuite/ltrace.minor/trace-exec.exp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/testsuite/ltrace.minor/trace-exec.exp b/testsuite/ltrace.minor/trace-exec.exp index c9de6f3..99145f5 100644 --- a/testsuite/ltrace.minor/trace-exec.exp +++ b/testsuite/ltrace.minor/trace-exec.exp @@ -3,12 +3,12 @@ set srcfile ${testfile}.c set binfile ${testfile} verbose "compiling first source file now....." -if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${srcdir}/${subdir}/${binfile}" executable {debug} ] != "" } { +if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${objdir}/${subdir}/${binfile}" executable {debug} ] != "" } { send_user "Testcase compile failed, so all tests in this file will automatically fail.\n" } verbose "compiling second source file now....." -if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}1.c" "${srcdir}/${subdir}/${binfile}1" executable {debug} ] != "" } { +if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}1.c" "${objdir}/${subdir}/${binfile}1" executable {debug} ] != "" } { send_user "Testcase compile failed, so all tests in this file will automatically fail.\n" } @@ -16,14 +16,14 @@ global LTRACE set exec_output "" #Run PUT for ltrace. -spawn $LTRACE $srcdir/$subdir/$testfile $srcdir/$subdir/${testfile}1 +spawn $LTRACE $objdir/$subdir/$testfile $objdir/$subdir/${testfile}1 set timeout 4 expect timeout { fail "Time out! Maybe caused by ltrace segment fault or improper timeout value here!" return } -catch "exec $LTRACE $srcdir/$subdir/$testfile $srcdir/$subdir/${testfile}1" exec_output +catch "exec $LTRACE $objdir/$subdir/$testfile $objdir/$subdir/${testfile}1" exec_output #check the output of this program. verbose "ltrace runtest output: $exec_output\n" @@ -35,11 +35,11 @@ if [regexp {ELF from incompatible architecture} $exec_output] { return } -ltrace_saveoutput "${exec_output}" ${srcdir}/${subdir}/${testfile}.ltrace +ltrace_saveoutput "${exec_output}" ${objdir}/${subdir}/${testfile}.ltrace # execl from first binary -ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace {"^execl"} 1 +ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace {"^execl"} 1 # puts from second binary -ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace {"^puts"} 1 +ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace {"^puts"} 1 # assume glibc and see we really trace both binaries -ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace {"^__libc_start_main"} 2 +ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace {"^__libc_start_main"} 2 |