selftests: Extract run_kselftest.sh and generate stand-alone test list
authorKees Cook <keescook@chromium.org>
Mon, 28 Sep 2020 20:26:48 +0000 (13:26 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 7 Oct 2020 13:58:54 +0000 (07:58 -0600)
commitf0f0a5df4e081e7a659929303fe83450edce9a3e
treefe4c52731e16b926d84450800658269123ea8b63
parent997a91fd4448e2600e460af31e5fb934328374a9
selftests: Extract run_kselftest.sh and generate stand-alone test list

Instead of building a script on the fly (which just repeats the same
thing for each test collection), move the script out of the Makefile and
into run_kselftest.sh, which reads kselftest-list.txt.

Adjust the emit_tests target to report each test on a separate line so
that test running tools (e.g. LAVA) can easily remove individual
tests (for example, as seen in [1]).

[1] https://github.com/Linaro/test-definitions/pull/208/commits/2e7b62155e4998e54ac0587704932484d4ff84c8

Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/Makefile
tools/testing/selftests/lib.mk
tools/testing/selftests/run_kselftest.sh [new file with mode: 0755]