Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a548de0f authored by Shuah Khan (Samsung OSG)'s avatar Shuah Khan (Samsung OSG)
Browse files

selftests: lib.mk: add test execute bit check to EMIT_TESTS



Similar to what RUN_TESTS does, change EMIT_TESTS to check for execute
bit and emit code to print warnings if test isn't executable to the
the run_kselftest.sh.

Signed-off-by: default avatarShuah Khan (Samsung OSG) <shuah@kernel.org>
parent 3df6131f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -100,7 +100,12 @@ define EMIT_TESTS
		test_num=`echo $$test_num+1 | bc`;	\
		TEST_HDR_MSG="selftests: "`basename $$PWD`:" $$BASENAME_TEST";	\
		echo "echo $$TEST_HDR_MSG";	\
		if [ ! -x $$TEST ]; then	\
			echo "echo \"$$TEST_HDR_MSG: Warning: file $$BASENAME_TEST is not executable, correct this.\"";		\
			echo "echo \"not ok 1..$$test_num $$TEST_HDR_MSG [FAIL]\""; \
		else
			echo "(./$$BASENAME_TEST >> \$$OUTPUT 2>&1 && echo \"ok 1..$$test_num $$TEST_HDR_MSG [PASS]\") || (if [ \$$? -eq \$$skip ]; then echo \"not ok 1..$$test_num $$TEST_HDR_MSG [SKIP]\"; else echo \"not ok 1..$$test_num $$TEST_HDR_MSG [FAIL]\"; fi;)"; \
		fi;		\
	done;
endef