public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v6 3/4] test: Convert build tests to exeter
Date: Tue, 2 Sep 2025 09:39:53 +0200	[thread overview]
Message-ID: <20250902093953.734411c7@elisabeth> (raw)
In-Reply-To: <20250901042515.138861-4-david@gibson.dropbear.id.au>

On Mon,  1 Sep 2025 14:25:14 +1000
David Gibson <david@gibson.dropbear.id.au> 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?

By the way, the shell script interface you added for that looks quite
convenient and obvious to me.

-- 
Stefano


  reply	other threads:[~2025-09-02  7:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-01  4:25 [PATCH v6 0/4] New proof-of-concept based exeter tests David Gibson
2025-09-01  4:25 ` [PATCH v6 1/4] test: Extend test scripts to allow running " David Gibson
2025-09-01  4:25 ` [PATCH v6 2/4] test: Run static checkers as " David Gibson
2025-09-01  4:25 ` [PATCH v6 3/4] test: Convert build tests to exeter David Gibson
2025-09-02  7:39   ` Stefano Brivio [this message]
2025-09-02 10:41     ` David Gibson
2025-09-02 12:23       ` Stefano Brivio
2025-09-03  0:54         ` David Gibson
2025-09-01  4:25 ` [PATCH v6 4/4] test: Allow exeter & podman tests to be parallel executed with BATS David Gibson
2025-09-03 21:14 ` [PATCH v6 0/4] New proof-of-concept based exeter tests Stefano Brivio
2025-09-04  2:42   ` David Gibson
2025-09-04 23:14     ` Stefano Brivio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250902093953.734411c7@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).