From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202508 header.b=a330Mjqo; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id B2D115A027E for ; Wed, 20 Aug 2025 12:55:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202508; t=1755687300; bh=iCD6kGBG9iLUzmYFPUC1rBFgCVGnbi+oJz55kpYkvTI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a330Mjqo8LZeOR6duPxnPcsW5pQyDw1U3agn4qQJYuu7DXQsqCy17sKAq+hSHj8YQ rcA9ZtpxsFe/Y47jgIxAFu+4XIBc2DyssAm8UW8WFFDfv2LJxOLvzA9j3MD7kLnamX MSNd+Ed20p7nAEVErM8A9FoRHxRT0SbdZg5waPJO1QZvPsYwMjARosK7qAx5JL+yNr wR67yFZZbwlNXLYH2MykC2tJ79SktTUc0bbenaCqziReKt2nJD53Sf9JIR6LVdlJhy HaEaRlJhnE4KkiC75N7P8cmEZ6BmJUaRzcO+R4tUPNdoea7tFA8nlKuBWRIpIqrphG F3OrYkJPs0Y2w== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4c6NdJ2v6fz4xSQ; Wed, 20 Aug 2025 20:55:00 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH v5 4/4] test: Allow exeter & podman tests to be parallel executed with BATS Date: Wed, 20 Aug 2025 20:54:56 +1000 Message-ID: <20250820105456.1281906-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250820105456.1281906-1-david@gibson.dropbear.id.au> References: <20250820105456.1281906-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: KNYXS4TR32GUPAUFVEVYV22HXW5GFYMC X-Message-ID-Hash: KNYXS4TR32GUPAUFVEVYV22HXW5GFYMC X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- test/.gitignore | 1 + test/Makefile | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/test/.gitignore b/test/.gitignore index cf48b885..9412f0d3 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 332f3f3e..1853fea3 100644 --- a/test/Makefile +++ b/test/Makefile @@ -5,7 +5,9 @@ # Copyright Red Hat # Author: David Gibson +BATS = bats -j $(shell nproc) WGET = wget -c +EXETOOL = ./exeter/exetool/exetool DEBIAN_IMGS = debian-8.11.0-openstack-amd64.qcow2 \ debian-10-nocloud-amd64.qcow2 \ @@ -62,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) @@ -73,6 +81,8 @@ pull-%: % exeter: git clone https://gitlab.com/dgibson/exeter.git +$(EXETOOL): pull-exeter + mbuto: git clone git://mbuto.sh/mbuto @@ -118,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 @@ -127,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 -- 2.50.1