aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorZachary T Welch <zwelch@codesourcery.com>2010-11-05 15:03:01 -0700
committerJoe Damato <ice799@gmail.com>2010-11-28 20:08:00 -0800
commit4627fc493db8459e6ef0597a4155a06b7d120d20 (patch)
tree812c0a31c6554878f067447216ce64d98bf29c77 /testsuite
parent3a9d1e753b6228347fc04c1f0a7a7fbb7147ec9a (diff)
downloadltrace-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')
-rw-r--r--testsuite/ltrace.main/main-internal.exp6
-rw-r--r--testsuite/ltrace.main/main.exp10
-rw-r--r--testsuite/ltrace.main/parameters.exp42
-rw-r--r--testsuite/ltrace.main/signals.exp6
-rw-r--r--testsuite/ltrace.main/system_calls.exp38
-rw-r--r--testsuite/ltrace.minor/attach-process.exp8
-rw-r--r--testsuite/ltrace.minor/count-record.exp30
-rw-r--r--testsuite/ltrace.minor/demangle.exp12
-rw-r--r--testsuite/ltrace.minor/print-instruction-pointer.exp10
-rw-r--r--testsuite/ltrace.minor/time-record-T.exp8
-rw-r--r--testsuite/ltrace.minor/time-record-tt.exp8
-rw-r--r--testsuite/ltrace.minor/time-record-ttt.exp8
-rw-r--r--testsuite/ltrace.minor/trace-clone.exp10
-rw-r--r--testsuite/ltrace.minor/trace-exec.exp16
-rw-r--r--testsuite/ltrace.minor/trace-fork.exp18
-rw-r--r--testsuite/ltrace.torture/signals.exp6
16 files changed, 118 insertions, 118 deletions
diff --git a/testsuite/ltrace.main/main-internal.exp b/testsuite/ltrace.main/main-internal.exp
index f3f0015..b497893 100644
--- a/testsuite/ltrace.main/main-internal.exp
+++ b/testsuite/ltrace.main/main-internal.exp
@@ -6,7 +6,7 @@ set binfile ${testfile}
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c ${srcdir}/${subdir}/${testfile}-1.c" "${srcdir}/${subdir}/${binfile}" executable {debug} ] != "" } {
+if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c ${srcdir}/${subdir}/${testfile}-1.c" "${objdir}/${subdir}/${binfile}" executable {debug} ] != "" } {
send_user "Testcase compile failed, so all tests in this file will automatically fail.\n"
}
@@ -14,7 +14,7 @@ if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c ${srcdir}/${subdir}/${
ltrace_options "-x" "display"
# Run PUT for ltarce.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
# Check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -30,4 +30,4 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
}
set pattern "display"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 12
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 12
diff --git a/testsuite/ltrace.main/main.exp b/testsuite/ltrace.main/main.exp
index ca66deb..9e126bc 100644
--- a/testsuite/ltrace.main/main.exp
+++ b/testsuite/ltrace.main/main.exp
@@ -5,7 +5,7 @@ set srcfile ${testfile}.c
set binfile ${testfile}
set libfile "main-lib"
set libsrc $srcdir/$subdir/$libfile.c
-set lib_sl $srcdir/$subdir/lib$testfile.so
+set lib_sl $objdir/$subdir/lib$testfile.so
if [get_compiler_info $binfile] {
@@ -14,15 +14,15 @@ if [get_compiler_info $binfile] {
verbose "compiling source file now....."
if { [ltrace_compile_shlib $libsrc $lib_sl debug ] != ""
- || [ltrace_compile $srcdir/$subdir/$srcfile $srcdir/$subdir/$binfile executable [list debug shlib=$lib_sl] ] != ""} {
+ || [ltrace_compile $srcdir/$subdir/$srcfile $objdir/$subdir/$binfile executable [list debug shlib=$lib_sl] ] != ""} {
send_user "Testcase compile failed, so all tests in this file will automatically fail.\n"
}
# set options for ltrace.
-ltrace_options "-l" "$srcdir/$subdir/libmain.so"
+ltrace_options "-l" "$objdir/$subdir/libmain.so"
# Run PUT for ltarce.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
# Check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -36,4 +36,4 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
# Verify the output by checking numbers of print in main.ltrace.
set pattern "print"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 10
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 10
diff --git a/testsuite/ltrace.main/parameters.exp b/testsuite/ltrace.main/parameters.exp
index bb55e03..5f37750 100644
--- a/testsuite/ltrace.main/parameters.exp
+++ b/testsuite/ltrace.main/parameters.exp
@@ -6,7 +6,7 @@ set srcfile ${testfile}.c
set binfile ${testfile}
set libfile "parameters-lib"
set libsrc $srcdir/$subdir/$libfile.c
-set lib_sl $srcdir/$subdir/lib$testfile.so
+set lib_sl $objdir/$subdir/lib$testfile.so
if [get_compiler_info $binfile] {
@@ -15,15 +15,15 @@ if [get_compiler_info $binfile] {
verbose "compiling source file now....."
if { [ltrace_compile_shlib $libsrc $lib_sl debug ] != ""
- || [ltrace_compile $srcdir/$subdir/$srcfile $srcdir/$subdir/$binfile executable [list debug shlib=$lib_sl] ] != ""} {
+ || [ltrace_compile $srcdir/$subdir/$srcfile $objdir/$subdir/$binfile executable [list debug shlib=$lib_sl] ] != ""} {
send_user "Testcase compile failed, so all tests in this file will automatically fail.\n"
}
# set options for ltrace.
-ltrace_options "-l" "$srcdir/$subdir/libparameters.so" "-F" "$srcdir/$subdir/parameters.conf"
+ltrace_options "-l" "$objdir/$subdir/libparameters.so" "-F" "$srcdir/$subdir/parameters.conf"
# Run PUT for ltarce.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
# Check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -37,36 +37,36 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
# Verify the output
set pattern "func_intptr(17)"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_intptr_ret(42)"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_strlen(\\\"Hello world\\\") *= *11"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_strfixed(\\\"Hell\\\")"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_ppp(80)"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_stringp(\\\"Dude\\\")"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_enum(BLUE)"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_short(-8, -9)"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_ushort(33, 34)"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_float(3.40*, -3.40*)"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_typedef(BLUE)"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_arrayi(. 10, 11, 12, 13\\.\\.\\. ., )"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_arrayi(. 10, 11 ., )"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_arrayf(. 10.10*, 11.10*, 12.10*, 13.10*\\.\\.\\. ., )"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_arrayf(. 10.10*, 11.10* ., )"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "exited (status 0)"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "func_struct({ 89, 2, 3, . { 1, 10 }, { 3, 30 } ., . { 4, 40 }, { 5, 50 }, { 6, 60 } ., \\\"123\\\" })"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
diff --git a/testsuite/ltrace.main/signals.exp b/testsuite/ltrace.main/signals.exp
index f0708e9..d812af6 100644
--- a/testsuite/ltrace.main/signals.exp
+++ b/testsuite/ltrace.main/signals.exp
@@ -7,7 +7,7 @@ set binfile ${testfile}
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-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."
}
@@ -15,7 +15,7 @@ if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${srcdir}/${subdir}/
ltrace_options "-L"
# Run PUT for ltarce.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
# Check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -36,4 +36,4 @@ close $fd
# Verify the output of ltrace by checking the number of SIGUSR1 in signal.ltrace
set pattern "SIGUSR1"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern $count
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern $count
diff --git a/testsuite/ltrace.main/system_calls.exp b/testsuite/ltrace.main/system_calls.exp
index b274db5..4947247 100644
--- a/testsuite/ltrace.main/system_calls.exp
+++ b/testsuite/ltrace.main/system_calls.exp
@@ -7,7 +7,7 @@ set binfile ${testfile}
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-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"
}
@@ -15,7 +15,7 @@ if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${srcdir}/${subdir}/
ltrace_options "-S"
#Run PUT for ltarce.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
#check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -30,38 +30,38 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
set pattern "SYS_munmap"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 2
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 2
set pattern "SYS_write"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_unlink"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_brk"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_open"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_fstat"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_mmap"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_close"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_getcwd"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_chdir"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_symlink"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_unlink"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_stat"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_access"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_rename"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_mkdir"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "SYS_rmdir"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
diff --git a/testsuite/ltrace.minor/attach-process.exp b/testsuite/ltrace.minor/attach-process.exp
index ab5460e..dbc11e8 100644
--- a/testsuite/ltrace.minor/attach-process.exp
+++ b/testsuite/ltrace.minor/attach-process.exp
@@ -6,12 +6,12 @@ set binfile ${testfile}
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-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"
}
# Run the program and get PID of it.
-catch "exec $srcdir/$subdir/$binfile &" output
+catch "exec $objdir/$subdir/$binfile &" output
# get PID from ps output.
regexp {([0-9]+)} $output match PID
@@ -19,7 +19,7 @@ verbose "PID = $PID"
# Run PUT for ltrace.
global LTRACE
-catch "exec $LTRACE -S -p $PID -o ${srcdir}/${subdir}/${testfile}.ltrace" exec_output
+catch "exec $LTRACE -S -p $PID -o ${objdir}/${subdir}/${testfile}.ltrace" exec_output
# Check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -34,5 +34,5 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
# Verify the output in attach-process.ltrace by checking the number
# of sleep.
set pattern "sleep"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
diff --git a/testsuite/ltrace.minor/count-record.exp b/testsuite/ltrace.minor/count-record.exp
index 1ff30ec..fe96b4c 100644
--- a/testsuite/ltrace.minor/count-record.exp
+++ b/testsuite/ltrace.minor/count-record.exp
@@ -6,7 +6,7 @@ set binfile ${testfile}
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-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"
}
@@ -14,7 +14,7 @@ if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${srcdir}/${subdir}/
ltrace_options "-c"
# Run PUT for ltrace.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
# Check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -46,29 +46,29 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
#
set pattern " 1 rmdir"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 1 fopen"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 2 remove"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 1 mkdir"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 1 fseek"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 1 fwrite"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 1 fclose"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 1 rename"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 1 symlink"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 1 chdir"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 1 access"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 1 getcwd"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
set pattern " 1 fread"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern
diff --git a/testsuite/ltrace.minor/demangle.exp b/testsuite/ltrace.minor/demangle.exp
index 5077ac0..c2d3aeb 100644
--- a/testsuite/ltrace.minor/demangle.exp
+++ b/testsuite/ltrace.minor/demangle.exp
@@ -5,7 +5,7 @@ set srcfile ${testfile}.cpp
set binfile ${testfile}
set libfile "demangle-lib"
set libsrc $srcdir/$subdir/$libfile.cpp
-set lib_sl $srcdir/$subdir/lib$testfile.so
+set lib_sl $objdir/$subdir/lib$testfile.so
verbose "compiling source file now....."
if [get_compiler_info $binfile "c++"] {
@@ -14,7 +14,7 @@ if [get_compiler_info $binfile "c++"] {
verbose "compiling source file now....."
if { [ltrace_compile_shlib $libsrc $lib_sl [list debug c++]] != ""
- || [ltrace_compile $srcdir/$subdir/$srcfile $srcdir/$subdir/$binfile executable [list debug shlib=$lib_sl c++] ] != ""} {
+ || [ltrace_compile $srcdir/$subdir/$srcfile $objdir/$subdir/$binfile executable [list debug shlib=$lib_sl c++] ] != ""} {
send_user "Testcase compile failed, so all tests in this file will automatically fail.\n"
}
@@ -22,7 +22,7 @@ if { [ltrace_compile_shlib $libsrc $lib_sl [list debug c++]] != ""
ltrace_options "-C"
# Run PUT for ltrace.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
# Check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -38,7 +38,7 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
set fd [ open $srcdir/$subdir/$srcfile r]
while { [gets $fd line] >= 0 } {
if [regexp {extern (double|float|void|char|int|short|long|void \*|void \*\*) ([^ ])\(} $line match type fun] {
- ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $fun
+ ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $fun
}
}
close $fd
@@ -53,10 +53,10 @@ while { [gets $fd line] >= 0 } {
# $fun = "myclass::operator delete" will confuse ltrace_verify_output if it
# was an argument to it.
if [regexp {(new|delete)} $fun match sub_fun] {
- ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $sub_fun
+ ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $sub_fun
} else {
# Verify class member functions without SPACE.
- ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $fun
+ ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $fun
}
}
}
diff --git a/testsuite/ltrace.minor/print-instruction-pointer.exp b/testsuite/ltrace.minor/print-instruction-pointer.exp
index 87cc8f7..039e906 100644
--- a/testsuite/ltrace.minor/print-instruction-pointer.exp
+++ b/testsuite/ltrace.minor/print-instruction-pointer.exp
@@ -7,14 +7,14 @@ set binfile ${testfile}
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-if { [ltrace_compile "${srcdir}/${subdir}/${srcfile}" "${srcdir}/${subdir}/${binfile}" executable {debug} ] != "" } {
+if { [ltrace_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${binfile}" executable {debug} ] != "" } {
send_user "Testcase compile failed, so all tests in this file will automatically fail.\n"
}
# set options for ltrace.
ltrace_options "-i"
# Run PUT for ltrace.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
# Check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -27,7 +27,7 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
}
# Get the addrss by objdump and sed.
-catch "exec sh -c {objdump -d $srcdir/$subdir/$binfile | sed -n '/^\[0-9a-fA-F\]\[0-9a-fA-F\]* <main>/,/^\[0-9a-fA-F\]\[0-9a-fA-F\]* </p'| grep -A 1 'call\\|bl' }" output
+catch "exec sh -c {objdump -d $objdir/$subdir/$binfile | sed -n '/^\[0-9a-fA-F\]\[0-9a-fA-F\]* <main>/,/^\[0-9a-fA-F\]\[0-9a-fA-F\]* </p'| grep -A 1 'call\\|bl' }" output
#verbose "output=$output"
catch "exec sh -c {echo \"$output\" | sed -n '2p'| awk -F' ' '{print \$1}'|awk -F: '{print \$1}'}" addr1
catch "exec sh -c {echo \"$output\" | sed -n '5p'| awk -F' ' '{print \$1}'|awk -F: '{print \$1}'}" addr2
@@ -36,7 +36,7 @@ verbose "addr1 = $addr1"
verbose "addr2 = $addr2"
# Verify the output by checking numbers of print in main.ltrace.
set pattern "$addr1.*printf"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern "$addr2.*printf"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
diff --git a/testsuite/ltrace.minor/time-record-T.exp b/testsuite/ltrace.minor/time-record-T.exp
index b411add..fc9a555 100644
--- a/testsuite/ltrace.minor/time-record-T.exp
+++ b/testsuite/ltrace.minor/time-record-T.exp
@@ -6,7 +6,7 @@ set binfile ${testfile}-T
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-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"
}
@@ -14,7 +14,7 @@ if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${srcdir}/${subdir}/
ltrace_options "-T"
# Run PUT for ltrace.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
verbose "ltrace runtest output: $exec_output\n"
# Check the output of this program.
@@ -37,7 +37,7 @@ close $fd
# Verify the time for calling sleep.
-set fd [ open $srcdir/$subdir/$binfile.ltrace r]
+set fd [ open $objdir/$subdir/$binfile.ltrace r]
set FOUND 0
while { [gets $fd line] >= 0 } {
# match the line with sleep and extract the spent time in sleep and sleep argument.
@@ -61,7 +61,7 @@ if {$FOUND != 1} then {
# Verify the time for calling nanosleep.
set FOUND 0
-set fd [ open $srcdir/$subdir/$binfile.ltrace r]
+set fd [ open $objdir/$subdir/$binfile.ltrace r]
while { [gets $fd line] >= 0 } {
# match the line with nanosleep and extract spent time and nanosleep argument.
if [ regexp {nanosleep.*<([0-9]+\.[0-9]+)>} $line match usec] then {
diff --git a/testsuite/ltrace.minor/time-record-tt.exp b/testsuite/ltrace.minor/time-record-tt.exp
index 332704a..6094164 100644
--- a/testsuite/ltrace.minor/time-record-tt.exp
+++ b/testsuite/ltrace.minor/time-record-tt.exp
@@ -6,7 +6,7 @@ set binfile ${testfile}-tt
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-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"
}
@@ -14,7 +14,7 @@ if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${srcdir}/${subdir}/
ltrace_options "-tt"
# Run PUT for ltrace.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
# Check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -27,7 +27,7 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
}
# Verify the time for calling sleep.
-set fd [ open $srcdir/$subdir/$binfile.ltrace r]
+set fd [ open $objdir/$subdir/$binfile.ltrace r]
set FOUND 0
while { [gets $fd line] >= 0 } {
# match the line with sleep and extract the strat time and sleep argument.
@@ -72,7 +72,7 @@ close $fd
# Verify the time for calling nanosleep.
set FOUND 0
-set fd [ open $srcdir/$subdir/$binfile.ltrace r]
+set fd [ open $objdir/$subdir/$binfile.ltrace r]
while { [gets $fd line] >= 0 } {
# match the line with sleep and extract the strat time and sleep argument.
if [ regexp {[0-9]+:[0-9]+:([0-9]+)\.([0-9][0-9][0-9]).* nanosleep} $line match start_sec start_usec ] then {
diff --git a/testsuite/ltrace.minor/time-record-ttt.exp b/testsuite/ltrace.minor/time-record-ttt.exp
index 2aee9d3..4271d0b 100644
--- a/testsuite/ltrace.minor/time-record-ttt.exp
+++ b/testsuite/ltrace.minor/time-record-ttt.exp
@@ -6,7 +6,7 @@ set binfile ${testfile}-ttt
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-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"
}
@@ -14,7 +14,7 @@ if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${srcdir}/${subdir}/
ltrace_options "-ttt"
# Run PUT for ltrace.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
# Check the output of this program.
@@ -28,7 +28,7 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
}
# Verify the time for calling sleep.
-set fd [ open $srcdir/$subdir/$binfile.ltrace r]
+set fd [ open $objdir/$subdir/$binfile.ltrace r]
set FOUND 0
while { [gets $fd line] >= 0 } {
# match the line with sleep and extract the strat time and sleep argument.
@@ -76,7 +76,7 @@ close $fd
# Verify the time for calling nanosleep.
set FOUND 0
-set fd [ open $srcdir/$subdir/$binfile.ltrace r]
+set fd [ open $objdir/$subdir/$binfile.ltrace r]
while { [gets $fd line] >= 0 } {
# match the line with sleep and extract the strat time and sleep argument.
if [ regexp {([0-9]+)\.([0-9][0-9][0-9]).* nanosleep} $line match start_sec start_usec ] then {
diff --git a/testsuite/ltrace.minor/trace-clone.exp b/testsuite/ltrace.minor/trace-clone.exp
index bda036f..749cc49 100644
--- a/testsuite/ltrace.minor/trace-clone.exp
+++ b/testsuite/ltrace.minor/trace-clone.exp
@@ -7,22 +7,22 @@ set binfile ${testfile}
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-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"
}
global LTRACE
#Run PUT for ltrace.
-spawn $LTRACE -f $srcdir/$subdir/$binfile
+spawn $LTRACE -f $objdir/$subdir/$binfile
set timeout 4
expect timeout {
fail "Time out! Maybe caused by ltrace segment fault or improper timeout value here!"
return
}
-catch "exec $LTRACE -f $srcdir/$subdir/$binfile" exec_output
+catch "exec $LTRACE -f $objdir/$subdir/$binfile" exec_output
# Save the output
-ltrace_saveoutput "${exec_output}" ${srcdir}/${subdir}/${testfile}.ltrace
+ltrace_saveoutput "${exec_output}" ${objdir}/${subdir}/${testfile}.ltrace
#check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -40,5 +40,5 @@ if [regexp {ELF from incompatible architecture} $exec_output] {
set pattern "clone"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
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
diff --git a/testsuite/ltrace.minor/trace-fork.exp b/testsuite/ltrace.minor/trace-fork.exp
index 0b22aa0..29a7cff 100644
--- a/testsuite/ltrace.minor/trace-fork.exp
+++ b/testsuite/ltrace.minor/trace-fork.exp
@@ -7,21 +7,21 @@ set binfile ${testfile}
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-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"
}
global LTRACE
set exec_output ""
#Run PUT for ltrace.
-spawn $LTRACE -f $srcdir/$subdir/$binfile
+spawn $LTRACE -f $objdir/$subdir/$binfile
set timeout 4
expect timeout {
fail "Time out! Maybe caused by ltrace segment fault or improper timeout value here!"
return
}
-catch "exec $LTRACE -f $srcdir/$subdir/$binfile" exec_output
+catch "exec $LTRACE -f $objdir/$subdir/$binfile" exec_output
#check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -33,7 +33,7 @@ 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
if [ regexp {Cannot attach} $exec_output ] {
fail "Couldn't attach to forked process!"
@@ -41,16 +41,16 @@ if [ regexp {Cannot attach} $exec_output ] {
}
set pattern {^\[pid [0-9]*\] fork}
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern {^\[pid [0-9]*\] printf}
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern {^\[pid [0-9]*\] puts}
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern {^\[pid [0-9]*\] wait}
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
set pattern {^\[pid [0-9]*\] sleep}
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 1
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
diff --git a/testsuite/ltrace.torture/signals.exp b/testsuite/ltrace.torture/signals.exp
index 56a2ec9..bf10bc9 100644
--- a/testsuite/ltrace.torture/signals.exp
+++ b/testsuite/ltrace.torture/signals.exp
@@ -7,7 +7,7 @@ set binfile ${testfile}
verbose "compiling source file now....."
# Build the shared libraries this test case needs.
-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."
}
@@ -15,7 +15,7 @@ if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${srcdir}/${subdir}/
ltrace_options "-L"
# Run PUT for ltarce.
-set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
+set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
# Check the output of this program.
verbose "ltrace runtest output: $exec_output\n"
@@ -33,5 +33,5 @@ while { [gets $fd line] >= 0 } {
regexp {define LOOP.*([0-9]+)} $line match count
}
set pattern "SIGUSR1"
-ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern $count
+ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern $count