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: > > > +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 = [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="-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']) > > I guess I'm missing something, but how do you set descriptions from > Python? There are two ways: 1) foo = 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. > > -- > Stefano > -- 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