selftests: lib.mk: suppress "cd" output from run_tests target
authorShuah Khan <shuahkh@osg.samsung.com>
Fri, 18 Aug 2017 23:03:53 +0000 (17:03 -0600)
committerShuah Khan <shuahkh@osg.samsung.com>
Fri, 25 Aug 2017 16:07:45 +0000 (10:07 -0600)
Suppress "cd" output from run_tests while running tests to declutter the
test results.

Running efivarfs test:
make --silent -C tools/testing/selftests/efivarfs/ run_tests

Before the change:

skip all tests: must be run as root
selftests: efivarfs.sh [PASS]
/lkml/linux-kselftest/tools/testing/selftests/efivarfs

After the change:

skip all tests: must be run as root
selftests: efivarfs.sh [PASS]

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

index e71f8e4633b1e70c2018a6102079ff56fa84cbc1..02989b2465a3d6200033246ab9758c732658d407 100644 (file)
@@ -18,7 +18,7 @@ define RUN_TESTS
                        echo "selftests: Warning: file $$BASENAME_TEST is not executable, correct this.";\
                        echo "selftests: $$BASENAME_TEST [FAIL]"; \
                else                                    \
-                       cd `dirname $$TEST`; (./$$BASENAME_TEST && echo "selftests: $$BASENAME_TEST [PASS]") || echo "selftests:  $$BASENAME_TEST [FAIL]"; cd -;\
+                       cd `dirname $$TEST` > /dev/null; (./$$BASENAME_TEST && echo "selftests: $$BASENAME_TEST [PASS]") || echo "selftests:  $$BASENAME_TEST [FAIL]"; cd - > /dev/null;\
                fi;                                     \
        done;
 endef