selftests: lib.mk: fix test executable status check to use full path
authorShuah Khan <shuahkh@osg.samsung.com>
Fri, 8 Sep 2017 02:04:26 +0000 (20:04 -0600)
committerShuah Khan <shuahkh@osg.samsung.com>
Thu, 21 Sep 2017 13:55:37 +0000 (07:55 -0600)
Fix test executable status check to use full path for make O=dir case,m
when tests are relocated to user specified object directory. Without the
full path, this check fails to find the file and fails the test.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/lib.mk

index 266d3ed4bb4101f6e2afdc44ade92f705f645136..fd1cbbbca8d7bd80319cdef018e00387d1bfd6a7 100644 (file)
@@ -21,7 +21,7 @@ define RUN_TESTS
                test_num=`echo $$test_num+1 | bc`;      \
                echo "selftests: $$BASENAME_TEST";      \
                echo "========================================";        \
-               if [ ! -x $$BASENAME_TEST ]; then       \
+               if [ ! -x $$TEST ]; then        \
                        echo "selftests: Warning: file $$BASENAME_TEST is not executable, correct this.";\
                        echo "not ok 1..$$test_num selftests: $$BASENAME_TEST [FAIL]"; \
                else                                    \