Repository navigation
Description
See some discussion here on Discord:
Probably need to keep refactoring those Bazel/CMake test suites to support xfail and let us more easily mark status across all those configs. I want something like pytest marks, but the check tests have the advantage of just being simple binary tests with a return code, no python test wrapper.
I could write a conftest.py for check tests similar to what I have for the ONNX test suite, just wrapping the existing .mlir files 🤔 . That could even sit alongside Bazel/CMake. If Android or something wants to use ctest it can keep doing that... hmm... might prototype that.
Yeah, I was going to suggest something like that. I would treat the test automation as something that works well for the wide middle... Pytest is good for that. Then treat the exotics as something you write a new test harness for. If Android, iOS, etc, you'll want to write something that takes all the tests and generated something they can run. There's no real lowest common denominator across that many axes. Personally, I would treat that current test tree as a lost cause: open a new one with a new harness. Migrate a directory out of it so you know you can. Then migrate the rest and delete anything that is left (there is some real old crap in there that should just be deleted)
Then just add a cmake utility rule to run the test suite for the clicky among us (or I'm sure there is a vs code extension that makes pytest clicky)
See also #11354
Implementation ideas / brainstorming
- Add a
tests.pyfile to each subdirectory under https://github.com/iree-org/iree/tree/main/tests/e2e - In that file, write a test case for each .mlir file
- Each test case can use a helper function to compile then run through iree-check-module (not iree-run-module)
- Something in the test file or a
conftest.pycan apply a matrix across backends, platforms, flag combinations, etc. - Apply Pytest marks for conditional xfails
- In CI jobs run
pytestin those directories, filtering using marks - Update docs (https://iree.dev/developers/general/testing-guide/) as needed
Activity