selftests: introduce gen_tar Makefile target
authorVeronika Kabatova <vkabatov@redhat.com>
Tue, 19 May 2020 20:00:45 +0000 (22:00 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 19 May 2020 22:11:46 +0000 (16:11 -0600)
commita5f304670b80973dfce5bc86cacff20244926cf6
treea778cb73ee28bd813278c14fbfb0cfab7732504a
parent2ef96a5bb12be62ef75b5828c0aab838ebb29cb8
selftests: introduce gen_tar Makefile target

The gen_kselftest_tar.sh always packages *all* selftests and doesn't
pass along any variables to `make install` to influence what should be
built. This can result in an early error on the command line ("Unknown
tarball format TARGETS=XXX"), or unexpected test failures as the
tarball contains tests people wanted to skip on purpose.

Since the makefile already contains all the logic, we can add a target
for packaging. Keep the default .gz target the script uses, and actually
extend the supported formats by using tar's autodetection.

To not break current workflows, keep the gen_kselftest_tar.sh script as
it is, with an added suggestion to use the makefile target instead.

Signed-off-by: Veronika Kabatova <vkabatov@redhat.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Documentation/dev-tools/kselftest.rst
tools/testing/selftests/Makefile
tools/testing/selftests/gen_kselftest_tar.sh