From: Paul Moore <[email protected]>

This commit also renames some of the variables in the tests directory
to better reflect their meaning.

Signed-off-by: Paul Moore <[email protected]>
---
 tests/38-basic-pfc_coverage.sh |    3 ++-
 tests/Makefile.am              |    8 ++++----
 tests/regression               |   10 +++++++++-
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/tests/38-basic-pfc_coverage.sh b/tests/38-basic-pfc_coverage.sh
index 598a57d6..d22947ac 100755
--- a/tests/38-basic-pfc_coverage.sh
+++ b/tests/38-basic-pfc_coverage.sh
@@ -42,4 +42,5 @@ function verify_deps() {
 verify_deps diff
 
 # compare output to the known good output, fail if different
-./38-basic-pfc_coverage | diff -q 38-basic-pfc_coverage.pfc - > /dev/null
+./38-basic-pfc_coverage | \
+       diff -q ${srcdir:=.}/38-basic-pfc_coverage.pfc - > /dev/null
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 025dfdf5..3251bf6b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -159,18 +159,18 @@ EXTRA_DIST_TESTCFGS = \
        37-sim-ipc_syscalls_be.tests \
        38-basic-pfc_coverage.tests
 
-EXTRA_DIST_TESTBASIC = \
-       38-basic-pfc_coverage.sh
+EXTRA_DIST_TESTSCRIPTS = \
+       38-basic-pfc_coverage.sh 38-basic-pfc_coverage.pfc
 
-EXTRA_DIST_TESTSCRIPTS = regression testdiff testgen
+EXTRA_DIST_TESTTOOLS = regression testdiff testgen
 
 EXTRA_DIST_TESTVALGRIND = valgrind_test.supp
 
 EXTRA_DIST = \
        ${EXTRA_DIST_TESTCFGS} \
        ${EXTRA_DIST_TESTPYTHON} \
-       ${EXTRA_DIST_TESTBASIC} \
        ${EXTRA_DIST_TESTSCRIPTS} \
+       ${EXTRA_DIST_TESTTOOLS} \
        ${EXTRA_DIST_TESTVALGRIND}
 
 nodist_00_test_SOURCES = 00-test.c
diff --git a/tests/regression b/tests/regression
index 55fcbf9d..10d41a41 100755
--- a/tests/regression
+++ b/tests/regression
@@ -605,6 +605,7 @@ function run_test_bpf_sim() {
 #
 function run_test_basic() {
        local rc
+       local cmd
 
        # if the test is a script, only run it in native/c mode
        if [[ $mode != "c" && $(echo "$2" | grep -q '.sh$') -eq 0 ]]; then
@@ -616,8 +617,15 @@ function run_test_basic() {
        # print out the input test data to the log file
        print_data "$1" "$2"
 
+       # check and adjust if we are doing a VPATH build
+       if [[ -x "./$2" ]]; then
+               cmd="./$2"
+       else
+               cmd="${srcdir}/$2"
+       fi
+
        # run the command
-       run_test_command "$1" "./$2" "" "" ""
+       run_test_command "$1" "$cmd" "" "" ""
        rc=$?
        if [[ $rc -ne 0 ]]; then
                print_result $1 "FAILURE" "$2 rc=$rc"

-- 
You received this message because you are subscribed to the Google Groups 
"libseccomp" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to