diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2025-09-05 16:43:16 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2025-09-05 13:00:19 +0200 |
commit | 3c44ef852586101eb6a5b8750d07454dbfb8a1a3 (patch) | |
tree | c7c9a2e0fdd03f1429a847fbb8fbadf16b999548 | |
parent | ffe34d28d53790d2d5a258587f9410d835ab0049 (diff) | |
download | passt-3c44ef852586101eb6a5b8750d07454dbfb8a1a3.tar passt-3c44ef852586101eb6a5b8750d07454dbfb8a1a3.tar.gz passt-3c44ef852586101eb6a5b8750d07454dbfb8a1a3.tar.bz2 passt-3c44ef852586101eb6a5b8750d07454dbfb8a1a3.tar.lz passt-3c44ef852586101eb6a5b8750d07454dbfb8a1a3.tar.xz passt-3c44ef852586101eb6a5b8750d07454dbfb8a1a3.tar.zst passt-3c44ef852586101eb6a5b8750d07454dbfb8a1a3.zip |
test: Allow exeter & podman tests to be parallel executed with BATS
As a proof-of-concept, this adds a "make bats" target which will execute
both the podman and exeter based testcases in parallel using BATS.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | test/.gitignore | 1 | ||||
-rw-r--r-- | test/Makefile | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/.gitignore b/test/.gitignore index cf48b88..9412f0d 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -12,3 +12,4 @@ rampstream guest-key guest-key.pub /exeter/ +*.bats diff --git a/test/Makefile b/test/Makefile index bfb58f2..a774285 100644 --- a/test/Makefile +++ b/test/Makefile @@ -5,6 +5,7 @@ # Copyright Red Hat # Author: David Gibson <david@gibson.dropbear.id.au> +BATS = bats -j $(shell nproc) EXETOOL = exeter/exetool/exetool WGET = wget -c @@ -63,6 +64,12 @@ LOCAL_ASSETS = mbuto.img mbuto.mem.img podman/bin/podman QEMU_EFI.fd \ ASSETS = $(DOWNLOAD_ASSETS) $(LOCAL_ASSETS) +EXETER_PYPATH = exeter/py3 +EXETER_BATS = smoke/smoke.sh.bats \ + build/build.py.bats build/static_checkers.sh.bats +BATS_FILES = $(EXETER_BATS) \ + podman/test/system/505-networking-pasta.bats + CFLAGS = -Wall -Werror -Wextra -pedantic -std=c99 assets: $(ASSETS) @@ -121,6 +128,12 @@ medium.bin: big.bin: dd if=/dev/urandom bs=1M count=10 of=$@ +$(EXETER_BATS): %.bats: % $(EXETOOL) + PYTHONPATH=$(EXETER_PYPATH) $(EXETOOL) bats -- $< > $@ + +bats: $(BATS_FILES) pull-podman + PYTHONPATH=$(EXETER_PYPATH) CONTAINERS_HELPER_BINARY_DIR=.. $(BATS) $(BATS_FILES) + check: assets ./run @@ -130,6 +143,7 @@ debug: assets clean: rm -f perf.js *~ rm -f $(LOCAL_ASSETS) + rm -f $(EXETER_BATS) rm -rf test_logs rm -f prepared-*.qcow2 prepared-*.img |