tum-ei-eda / seal5

Seal5 - Semi-automated LLVM Support for RISC-V Extensions including Autovectorization
https://tum-ei-eda.github.io/seal5/
Apache License 2.0
8 stars 3 forks source link

Add pytest suite for seal5 #96

Open PhilippvK opened 1 month ago

jokap11 commented 3 weeks ago

In which direction should this go?

PhilippvK commented 2 weeks ago

@jokap11 sorry for the late response.

here I would like to focus on the Python-only tests (aka no LLVM compilation involved)

these are the test levels that are appropriate:

  1. First, minimal unit tests should be added for verifying small helper/utility functions used in the codebase.
  2. Next we can add integration tests for testing specific submodules/components (such as transforms/backends) independently (using dummy inputs and comparing the resulting metamodel or generated patches with the expected output)
  3. Finally there are more complex test-cases which involve more than one component or include running multiple steps in the seal5 flow. I am not planning to add specific tests cases for these as they should (hopefully) show up in the end-to-end examples based on real-world inputs.

I hope this answers your question. I think to get this started we should start with the ones which are very simple (aka level 1). We should probably also add coverage support to see which files/functions lack proper testing.