Add a 'portable' mode that packages all relevant flat files and helper scripts into a tarball named 'kut-portable.tar.gz'. This mode is useful for compiling tests on one machine and running them on another without needing to clone the entire repository. It allows the runner scripts and unit test configurations to remain local to the machine under test. Signed-off-by: Jon Kohler <jon@xxxxxxxxxxx> --- .gitignore | 2 ++ Makefile | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/.gitignore b/.gitignore index 2168e013..643220f8 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,8 @@ cscope.* /lib/config.h /config.mak /*-run +/kut-portable +kut-portable.tar.gz /msr.out /tests /build-head diff --git a/Makefile b/Makefile index 7471f728..c6333c1a 100644 --- a/Makefile +++ b/Makefile @@ -125,6 +125,23 @@ all: directories $(shell (cd $(SRCDIR) && git rev-parse --verify --short=8 HEAD) standalone: all @scripts/mkstandalone.sh +portable: all + rm -f kut-portable.tar.gz + rm -rf kut-portable + mkdir -p kut-portable/scripts/s390x + mkdir -p kut-portable/$(TEST_DIR) + cp build-head kut-portable + cp errata.txt kut-portable + cp config.mak kut-portable + sed -i '/^ERRATATXT/cERRATATXT=errata.txt' kut-portable/config.mak + cp run_tests.sh kut-portable + cp -r scripts/* kut-portable/scripts + cp $(TEST_DIR)-run kut-portable + cp $(TEST_DIR)/*.flat kut-portable/$(TEST_DIR) + cp $(TEST_DIR)/unittests.cfg kut-portable/$(TEST_DIR) + cp $(TEST_DIR)/run kut-portable/$(TEST_DIR) + tar -czf kut-portable.tar.gz kut-portable + install: standalone mkdir -p $(DESTDIR) install tests/* $(DESTDIR) -- 2.43.0