From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 15AE35A0319 for ; Fri, 19 Jul 2024 08:59:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1721372349; bh=kne1x5WhnDRX7NDN/ZTYI2eAaujpMTBne+HeRCOx0UM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LyFx4fd1VH0zpt5g+26N+RuKaXGSEu6fk8js+l+4rmOj/e6PqAxqj3lxTQd7sw6L+ YGLOA6CShM6giGjzdyVNAwiY5TY0LWPozxFWkfKEprZ2lsBVMRp0jDN2mD2S9cRBEh BJlHX+e1+m54kMK1u2dGErL6HPp7JK0xH8/xz3ObIc9bl46R1h00RUtjNDhhDSC2UE jvl+HXhK980u1qfIRS5GG+V01Xg9/iCMShQy/5GT1ISEAvcSvJ5OLiL5PNArbZ8GAv 9uk+gzCH9paFMeK/PlF0qjmMqmINzi4a9USGWkh79oyE4oYg2CP4nVwyFavRaPV87H IDAQkav4uh3CQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WQLBP2VJbz4x6k; Fri, 19 Jul 2024 16:59:09 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 2/4] test: Extend make targets to run Avocado tests Date: Fri, 19 Jul 2024 16:59:05 +1000 Message-ID: <20240719065907.3539211-3-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240719065907.3539211-1-david@gibson.dropbear.id.au> References: <20240719065907.3539211-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: QLN6WJKA3LAMIZEON7VFX234J7N3XYKJ X-Message-ID-Hash: QLN6WJKA3LAMIZEON7VFX234J7N3XYKJ 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: Cleber Rosa , 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: Add a new 'avocado' target to the test/ Makefile, which will install avocado into a Python venv, and run the Avocado based tests with it. Signed-off-by: David Gibson --- test/.gitignore | 1 + test/Makefile | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/test/.gitignore b/test/.gitignore index 6dd4790b..a79d5b6f 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -10,3 +10,4 @@ QEMU_EFI.fd nstool guest-key guest-key.pub +/venv/ diff --git a/test/Makefile b/test/Makefile index 35a3b559..ff8dc63d 100644 --- a/test/Makefile +++ b/test/Makefile @@ -63,6 +63,12 @@ LOCAL_ASSETS = mbuto.img mbuto.mem.img podman/bin/podman QEMU_EFI.fd \ ASSETS = $(DOWNLOAD_ASSETS) $(LOCAL_ASSETS) +SYSTEM_PYTHON = python3 +VENV = venv +PYTHON = $(VENV)/bin/python3 +PIP = $(VENV)/bin/pip3 +AVOCADO = $(VENV)/bin/avocado + CFLAGS = -Wall -Werror -Wextra -pedantic -std=c99 assets: $(ASSETS) @@ -116,6 +122,15 @@ medium.bin: big.bin: dd if=/dev/urandom bs=1M count=10 of=$@ +.PHONY: venv +venv: + $(SYSTEM_PYTHON) -m venv $(VENV) + $(PIP) install avocado-framework + +.PHONY: avocado +avocado: venv + cd .. && test/$(AVOCADO) run test/avocado + check: assets ./run @@ -127,6 +142,7 @@ clean: rm -f $(LOCAL_ASSETS) rm -rf test_logs rm -f prepared-*.qcow2 prepared-*.img + rm -rf $(VENV) realclean: clean rm -rf $(DOWNLOAD_ASSETS) -- 2.45.2