Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Control via environment variables #822

Open
iskunk opened this issue Nov 1, 2023 · 0 comments
Open

Request: Control via environment variables #822

iskunk opened this issue Nov 1, 2023 · 0 comments

Comments

@iskunk
Copy link

iskunk commented Nov 1, 2023

Description

It would be useful to support environment variables as an alternative to command-line options when invoking test programs. A good example of this can be seen in googletest's GTEST_FILTER variable, which allows one to specify patterns for test selection/exclusion.

I recently had to deal with the build of xsimd, and its main doctest-based test program (test_xsimd) has a single failing test for me. As I cannot resolve the issue myself, I want to exclude that one specific test for now.

The xsimd build is CMake-based, and I normally invoke the test suite for those via make test. This, in turn, runs ctest, which is what runs test_xsimd. Neither of those layers, as far as I could find, offer a way of passing in a --test-case-exclude=... option to the test program without modifying the source CMake scripts. If there were a e.g. DOCTEST_TEST_CASE_EXCLUDE variable I could set, however, then the solution would be straightforward.

(The syntax would need to be carefully specified, however... the name of the test case at issue includes a space.)

Extra information

I was working with doctest 2.4.11 on Linux.

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

No branches or pull requests

1 participant