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=MbM9Y4Vz; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 439D95A027B for ; Mon, 01 Sep 2025 06:25:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202508; t=1756700718; bh=VJRDkMwlszj2wd36O0vVc4CA5hYsdvzgwJ7Tv1yQKzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MbM9Y4VzxIz+AjEB4ws8NBrIQ1FlQHKHVURAQVCqs5q2r/HKu9AAb+5ytE9qxRXir A6k9aP4K17iAsXJpMkHJ42893X63F8urjXf3GZy0jHZo5gePGRu0LILFvkSjQRrQ/y RON3UCtp5K6V/bLY5dz0YQNwxwtN+lvWsZnYsUW4IJ7PTOMREw+PnjysOxXlNdSzgj x3R+qfhPHcD8T6J9jnxK46CXuKp7oSkXjfMiAqY2m51IZOLDg8wZFUQb6sAflzYMie lfh4fBx4Cyd9XQWBgybceX/5coCvn2w24T5bf2i/B2Id42zNOzfq8aDwM3NWIAK73o qKm/cwP4+Pi6g== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cFbQ627NYz4w9b; Mon, 1 Sep 2025 14:25:18 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v6 4/4] test: Allow exeter & podman tests to be parallel executed with BATS Date: Mon, 1 Sep 2025 14:25:15 +1000 Message-ID: <20250901042515.138861-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250901042515.138861-1-david@gibson.dropbear.id.au> References: <20250901042515.138861-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: BSC5IVZHWL3QGQW2M54N37FD2Q37ORT2 X-Message-ID-Hash: BSC5IVZHWL3QGQW2M54N37FD2Q37ORT2 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.51.0