Commit graph

4 commits

Author SHA1 Message Date
Veronika Kabatova
a5f304670b 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>
2020-05-19 16:11:46 -06:00
Kees Cook
ea1bf0bb18 selftests: gen_kselftest_tar.sh: Do not clobber kselftest/
The default installation location for gen_kselftest_tar.sh was still
"kselftest/" which collides with the existing directory. Instead, this
moves the installation target into "kselftest_install/kselftest/" and
adjusts the tar creation accordingly. This also adjusts indentation and
logic to be consistent.

Fixes: 42d46e57ec ("selftests: Extract single-test shell logic from lib.mk")
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2019-11-07 14:43:27 -07:00
Shuah Khan
6ee7bcc46e selftests: gen_kselftest_tar.h: Add SPDX license identifier
Replace GPL license statement with SPDX GPL-2.0 license identifier.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2018-01-12 11:44:31 -07:00
Shuah Khan
f901caaf8e selftests: Add tool to generate kselftest tar archive
gen_kselftest_tar.sh tool generates kselftest tar archive. This tool
supports uncompressed tar, gz, bz, and xz compression formats and the
default compression format is gzip. This tool runs kselftest install
tool as its back-end.

Usage:
cd tools/testing/selftests
./gen_kselftest_tar [ tar | targz | tarbz2 | tarxz ]

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-24 08:43:19 -06:00