Add argument to specify environment for bash tests#2845
Closed
Conversation
|
clang-tidy review says "All clean, LGTM! 👍" |
c460314 to
cc13f77
Compare
This adds a new function argument to add_bash_tests() to specify environment variables that should be defined for running a test.
cc13f77 to
eae18dc
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
Merged
Lestropie
added a commit
that referenced
this pull request
May 19, 2024
- Restore solution in #2845 not properly propagated through prior merge conflict. - Use FileExistsError when checking for pre-existing output files / directories, and catch it to yield a well-formatted error message. - Update CLI test data to reflect changes in 05b68d5. - Modify tests that check for command error due to inappropriate CLI usage.
Member
|
Included in merge of #2678. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a new function argument to add_bash_tests() to specify environment variables that should be defined for running a test.
Usage example:
add_bash_tests( FILE_PATH file PREFIX script WORKING_DIRECTORY ${DATA_DIR} ENVIRONMENT "PYTHONPATH=${PROJECT_BINARY_DIR}/lib" )In #2678, the possibility of specifying
PYTHONPATHfor a given test seems to be useful. This PR addresses this need more generally, by allowing the specification of any environment variables when running a collection of tests specified in a text file.@Lestropie this should be enough to address the issue raised, but let me know if this actually solves the problem.