cccl
cccl copied to clipboard
Refactor `lit`-based testing infrastructure to eliminate redudnancy with cmake-provided information
There's a lot of stuff that lit does that is redundant with what cmake already does for us.
We should boil away as much of that as we can and just use cmake for that such that lit just does:
- Build/Test files for a given directory
- Test file meta-language
.passor.failfile name convention for pass/fail at compile/runtime- Compiler/CTK version/feature specific comments
From first principles, we want using lit to look like:
- Invoke
cmaketo generate site config file - Invoke lit using config file (
SITE_CONFIG=*config file* lit /path/to/file(s))- It will then compile/run all files in the given path
For files following the convention:
- X.pass.cpp -> should pass compile & runtime
- X.fail.cpp -> should fail compile
- X.runfail.cpp -> should fail at runtime
With support in the test files themselves for "meta-comments", e.g., things like the UNSUPPORTED: key
- https://github.com/NVIDIA/cccl/blob/050b57c3199088674e0d7ddabdcdd32001a4c032/libcudacxx/test/libcudacxx/cuda/barrier/arrive_tx_cta.pass.cpp#L11-L12
Would it be possible to add X.compile.pass.cpp for tests that should be just compiled? This is a common case for e. g. testing deduction guides
Attempting to document lit behavior here: https://github.com/NVIDIA/cccl/issues/6556