public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>, passt-dev@passt.top
Cc: Cleber Rosa <crosa@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 0/4] RFC: Proof-of-concept based exeter+Avocado tests
Date: Fri, 19 Jul 2024 16:59:03 +1000	[thread overview]
Message-ID: <20240719065907.3539211-1-david@gibson.dropbear.id.au> (raw)

Here's a rough proof of concept showing how we could run tests for
passt with Avocado and the exeter library I recently created.  It
includes Cleber's patch adding some basic Avocado tests and builds on
that.

The current draft is pretty janky:
 * The build rules to download and install the necessary pieces are messy
 * We create the Avocado job files from the exeter sources in the
   Makefile.  Ideally Avocado would eventually be extended to handle
   this itself
 * We have more ugly make rules to mangle the right venv path into the
   exeter based python script
 * The names that Avocado sees for each test are terrible
   (nondescriptive and duplicated).  This is the point I made in an
   earlier reply to Cleber's patch - we need some way of setting the
   test name from the job files.
 * There's some hacks to make sure things are executed from the
   right working directory

But, it's a starting point.

Stefano,

I'm hoping most of the jank in the setup can be cleaned up.  The bit I
really want your opinion on is how the test scripts themslves look:
test/build/static_checkers.exeter (shell) and
test/build/build.exeter.in (Python).

Cleber,

I hope this concrete example makes it a bit clearer how I'm thinking
about running tests from Avocado, without making the test themselves
inherently tied to Avocado.

Cleber Rosa (1):
  test: run static checkers with Avocado and JSON definitions

David Gibson (3):
  test: Extend make targets to run Avocado tests
  test: Exeter based static tests
  test: Add exeter+Avocado based build tests

 test/.gitignore                   |  2 +
 test/Makefile                     | 33 +++++++++++-
 test/avocado/static_checkers.json | 16 ++++++
 test/build/.gitignore             |  2 +
 test/build/build.exeter.in        | 89 +++++++++++++++++++++++++++++++
 test/build/static_checkers.exeter | 17 ++++++
 test/run_avocado                  | 49 +++++++++++++++++
 7 files changed, 207 insertions(+), 1 deletion(-)
 create mode 100644 test/avocado/static_checkers.json
 create mode 100644 test/build/.gitignore
 create mode 100644 test/build/build.exeter.in
 create mode 100755 test/build/static_checkers.exeter
 create mode 100755 test/run_avocado

-- 
2.45.2


             reply	other threads:[~2024-07-19  6:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-19  6:59 David Gibson [this message]
2024-07-19  6:59 ` [PATCH 1/4] test: run static checkers with Avocado and JSON definitions David Gibson
2024-07-19  6:59 ` [PATCH 2/4] test: Extend make targets to run Avocado tests David Gibson
2024-07-19  6:59 ` [PATCH 3/4] test: Exeter based static tests David Gibson
2024-07-19  6:59 ` [PATCH 4/4] test: Add exeter+Avocado based build tests David Gibson

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=20240719065907.3539211-1-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=crosa@redhat.com \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /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).