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=T+c5MKB+; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 07EBD5A027C for ; Thu, 04 Sep 2025 04:50:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202508; t=1756954205; bh=fxlAYc1z+4Bwy/KDo08UQ22PQN9J6/uOtRjMLEAOOzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T+c5MKB+ILmK7MdMp3LTviugaOwty1s+J8ip9WbWDXfN6J8TNZBaAQrUuInxX//fS ML110bdv7qVla9vTRnGFg1HR+zRGF8UqQwYuOZvfPxvHeSiQITC3+39dOD9c1vDCpS 1cIrGiEEBXis71LDo9AvLkBXfiIRVO11stKl1s29zg9+Iu0NoYe2OGQvfxJxXb2dl4 4nNvzFg2WW6OxBIuq7ve0jTYLU5jejI70cOMqiNj1ijeemxYUXge15EhJUb7WJb85f 2VHgcMvuf7esjXuCwrvYjT/qVSjqpjbmnWpVSgOW7DLhN/BAHNSqTNbxcM+yNx7cVc c8hCMGYiSVJPg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cHP8s5yglz4wB7; Thu, 4 Sep 2025 12:50:05 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH v7 4/4] test: Allow exeter & podman tests to be parallel executed with BATS Date: Thu, 4 Sep 2025 12:50:04 +1000 Message-ID: <20250904025004.491185-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250904025004.491185-1-david@gibson.dropbear.id.au> References: <20250904025004.491185-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: PR4AWX5MGY6WBWGDQKKZ53VX5REC3LXU X-Message-ID-Hash: PR4AWX5MGY6WBWGDQKKZ53VX5REC3LXU 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 | 14 ++++++++++++++ 2 files changed, 15 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 bfb58f27..a774285e 100644 --- a/test/Makefile +++ b/test/Makefile @@ -5,6 +5,7 @@ # Copyright Red Hat # Author: David Gibson +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 -- 2.51.0