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=oIv3LKIO; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 12AF25A0271 for ; Tue, 02 Sep 2025 14:16:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202508; t=1756815390; bh=RYbrxNbWzZ8MRPYrSzq5gfpNLtXU0PJLYEuutfH/B5k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oIv3LKIOGJ/EG8ZEBl88ZTIcKmCGlnnv8sD/x7Klebu0DvOlHflXBmBELfw7TXjDY EwboY7E9Ez1Jdr/MOrbOfa/B36lYv1bMKsXk7zOd4e2KjUXqy4N6aDqTocQWtjCGGy w2gAMPZNZCyB44+LFqyoYm0yVKbO91tlif9wVIGeashVbQBkd0+L/FK+211IOuwe8G Gjnc9HKpCcwJs136OHNDUHSGCRAI78s/A+0A7sGxuu/ZNQ+3d8BgYpbTZW+dcOYdnx R4fRjDfRoaDG5gnsfbKBSJ1zBZhu0O0VQxQZS1KX+7Y1VsqbVFDqYgzweVcShmyrYj T82Aq/hSUkBRQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cGPqL0zY0z4w9j; Tue, 2 Sep 2025 22:16:30 +1000 (AEST) Date: Tue, 2 Sep 2025 20:41:41 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v6 3/4] test: Convert build tests to exeter Message-ID: References: <20250901042515.138861-1-david@gibson.dropbear.id.au> <20250901042515.138861-4-david@gibson.dropbear.id.au> <20250902093953.734411c7@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Bx0iE46LjG489n8B" Content-Disposition: inline In-Reply-To: <20250902093953.734411c7@elisabeth> Message-ID-Hash: WAZ5V6QCZMYZTROWOGPTTFTCPYZ65D7W X-Message-ID-Hash: WAZ5V6QCZMYZTROWOGPTTFTCPYZ65D7W 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: passt-dev@passt.top 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: --Bx0iE46LjG489n8B Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 02, 2025 at 09:39:53AM +0200, Stefano Brivio wrote: > On Mon, 1 Sep 2025 14:25:14 +1000 > David Gibson wrote: >=20 > > +def test_make(target: str, expected_files: list[str]) -> None: > > + """Test `make {target}` > > + > > + Arguments: > > + target -- make target to invoke > > + expected_files -- files make is expected to create > > + > > + Verifies that > > + 1) `make target` completes successfully > > + 2) expected_files care created by `make target` > > + 3) expected_files are removed by `make clean` > > + """ > > + > > + ex_paths =3D [Path(f) for f in expected_files] > > + with clone_sources(): > > + for p in ex_paths: > > + assert not p.exists(), f"{p} existed before make" > > + sh(f'make {target} CFLAGS=3D"-Werror"') > > + for p in ex_paths: > > + assert p.exists(), f"{p} wasn't made" > > + sh('make clean') > > + for p in ex_paths: > > + assert not p.exists(), f"{p} existed after make clean" > > + > > + > > +exeter.register('make_passt', test_make, 'passt', ['passt']) > > +exeter.register('make_pasta', test_make, 'pasta', ['pasta']) > > +exeter.register('make_qrap', test_make, 'qrap', ['qrap']) > > +exeter.register('make_all', test_make, 'all', ['passt', 'pasta', 'qrap= ']) >=20 > I guess I'm missing something, but how do you set descriptions from > Python? There are two ways: 1) foo =3D exeter.register(...) foo.set_description("test that does the thing") 2) By default exeter will take it from the first line of the test function's docstring. > By the way, the shell script interface you added for that looks quite > convenient and obvious to me. >=20 > --=20 > Stefano >=20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --Bx0iE46LjG489n8B Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmi2yd4ACgkQzQJF27ox 2Gd4DhAAn81adD7/k6B2laXww7qWPGVSDGQhpDXr+P27eIN4BCsEShc3s0b4bnb7 YRLJ0PBl26galLUhGLEHiXiSNRKUYUlmmkcEPq0Js6udhntQZm3LZgu8sOr5cKzm IIv5xde8vRZNgqJ7ao+Bx9TqK9Fb2YeCkRuP3UoB/17DgN2G3FfQIxjmiwnZKwkA VHlopheQSmSn9obIREazXcsI50lkOLzQb++OoY9a5MIo+FRnko34GfGgz9wOoDix E5PpoGysGAgvvqKNNljrSRoufSqkSUBTYH1LMjBnhIsK61HPDX6qcTLxNDXI6FoK BxW81GnENAV4YWRbPbOCpT0VFikCnzuGuRqqjTRPiZ5UrIHyhYp3OfWQLI6XTPH1 5R9IRJqGiiSoxwZ+f2Dx/3dTKP6hZio8SN+A70gX1WSQGks02ql69vkjLr5hv/zv VmAbzn+1uyiYgjkABhs3T3IErVDocqwQ0DRETWcU7QM2M5nBlBP++mUGr4k9JS+f OhRGm9o0Zmv21EaaD1CYTioizvP5UOHZhMoneuv0PdMHch/H7lD1B6ARPOzS1TKn UVMOFP1BP4t5/G3rjgTqSIhRC9Fh9UtlqhjimZaMxqLpjZ9SBzg8VyGvEftAUqPB S3G0s96iXtX2h2oNq7BSoACIkftkTCieDUP3tOFyxEDLnGWHTBU= =zF9P -----END PGP SIGNATURE----- --Bx0iE46LjG489n8B--