8000 xls: Emit a warning when DSLX test or quickcheck runners find no tests by copybara-service[bot] · Pull Request #5411 · google/xls · GitHub
[go: up one dir, main page]

Skip to content

xls: Emit a warning when DSLX test or quickcheck runners find no tests - #5411

Draft
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1021571820
Draft

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1021571820

Conversation

@copybara-service
Copy link
Copy Markdown

xls: Emit a warning when DSLX test or quickcheck runners find no tests

When running interpreter_main or prove_quickcheck_main on a DSLX module that has no test annotations (#[test], #[test_proc], or #[quickcheck]), the runner previously printed 0 test(s) ran; 0 failed; 0 skipped. and exited 0 without noting that no test functions were present in the module.

  • Emit a clear WARNING: message to std::cerr in AbstractTestRunner::ParseAndTest when a module contains neither unit tests (#[test] / #[test_proc]) nor #[quickcheck] properties.
  • Emit a corresponding WARNING: message in ParseAndProve when a module contains no #[quickcheck] properties.
  • Add unit tests in xls/dslx/run_routines/run_routines_test.cc and xls/dslx/interpreter_test.py verifying the warning output.

When running `interpreter_main` or `prove_quickcheck_main` on a DSLX module that has no test annotations (`#[test]`, `#[test_proc]`, or `#[quickcheck]`), the runner previously printed `0 test(s) ran; 0 failed; 0 skipped.` and exited 0 without noting that no test functions were present in the module.

- Emit a clear `WARNING:` message to `std::cerr` in `AbstractTestRunner::ParseAndTest` when a module contains neither unit tests (`#[test]` / `#[test_proc]`) nor `#[quickcheck]` properties.
- Emit a corresponding `WARNING:` message in `ParseAndProve` when a module contains no `#[quickcheck]` properties.
- Add unit tests in `xls/dslx/run_routines/run_routines_test.cc` and `xls/dslx/interpreter_test.py` verifying the warning output.

PiperOrigin-RevId: 1021571820

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0