From 7a51d7a1da030aa9e2d2e537dd368584d37e4a0a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 14 May 2020 23:50:40 +0000 Subject: [PATCH] ci: Install kola tests This builds on https://github.com/coreos/coreos-assembler/pull/1441 to install our tests rather than running them from the source directory. This model will more cleanly allow us to ship our tests along with a test container or elsewhere, separate from the source directory. Also prep for https://github.com/ostreedev/ostree/pull/2048 --- .cci.jenkinsfile | 3 +++ Makefile-tests.am | 7 +++++++ tests/kola/Makefile | 13 +++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 tests/kola/Makefile diff --git a/.cci.jenkinsfile b/.cci.jenkinsfile index d1f2a231e9..68656cbd8a 100644 --- a/.cci.jenkinsfile +++ b/.cci.jenkinsfile @@ -76,6 +76,9 @@ parallel fcos: { rmdir insttree coreos-assembler fetch coreos-assembler build + # Install the tests, then be sure they're not run again + make -C tests/kola install + rm tests/kola -rf """) } fcosKola(cosaDir: "${env.WORKSPACE}") diff --git a/Makefile-tests.am b/Makefile-tests.am index a172f01574..411c5628d4 100644 --- a/Makefile-tests.am +++ b/Makefile-tests.am @@ -456,3 +456,10 @@ else endif INSTALL_DATA_HOOKS += install-installed-tests-extra endif + +# Just forward these +build-kola-tests: + $(MAKE) -C tests/kola + +install-kola-tests: + $(MAKE) -C tests/kola install diff --git a/tests/kola/Makefile b/tests/kola/Makefile new file mode 100644 index 0000000000..4ee51ba969 --- /dev/null +++ b/tests/kola/Makefile @@ -0,0 +1,13 @@ +DESTDIR ?= + +TESTDIRS := destructive nondestructive +SCRIPTS := $(shell ls *.sh) + +KOLA_TESTDIR = $(DESTDIR)/usr/lib/coreos-assembler/tests/kola/ostree/ + +all: + for x in $(SCRIPTS); do bash -n "$${x}"; done + +install: + install -D -t $(KOLA_TESTDIR) $(SCRIPTS) + for x in $(TESTDIRS); do rsync -rlv ./$${x} $(KOLA_TESTDIR)/; done