[PATCH 0/4] RFC: Proof-of-concept based exeter+Avocado tests
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
From: Cleber Rosa
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
Introduce some trivial testcases based on the exeter library. These run
the C static checkers, which is redundant with the included Avocado json
file, but are useful as an example. We extend the make avocado target to
generate Avocado job files from the exeter tests and include them in the
test run.
Signed-off-by: David Gibson
Add a new test script to run the equivalent of the tests in build/all
using exeter and Avocado. This new version of the tests is more robust
than the original, since it makes a temporary copy of the source tree so
will not be affected by concurrent manual builds.
Signed-off-by: David Gibson
participants (1)
-
David Gibson