NVIDIA / NVIDIA/cccl

Refactor `lit`-based testing infrastructure to eliminate redudnancy with cmake-provided information

Open
#6,163 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

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
- `.pass` or `.fail` file name convention for pass/fail at compile/runtime
- Compiler/CTK version/feature specific comments

From first principles, we want using `lit` to look like:

1. Invoke `cmake` to generate site config file
2. 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.