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

Extend instead of overrride PATH in tests #215

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.16.3)
cmake_minimum_required (VERSION 3.22)

project(ASTE VERSION 3.3.0)

Expand Down Expand Up @@ -135,7 +135,7 @@ foreach(example IN LISTS _examples)
set_tests_properties(aste.example.${example} aste.example.${example}.setup
PROPERTIES
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/examples/${example}"
ENVIRONMENT "PATH=$ENV{PATH}:${CMAKE_BINARY_DIR}"
ENVIRONMENT_MODIFICATION "PATH=path_list_append:${CMAKE_BINARY_DIR}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this also how we handle this in our preCICE profiling tests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There, the test directly calls the file, so PATH modifications aren't required.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And in our case the python script calls the file, right?

Since the diff at the end is part of the test: can we do something similar here?

Copy link
Member Author

@fsimonis fsimonis Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, CTest calls the run.sh, which calls the precice-aste-* scripts.
The run.sh needs the updated PATH.

One could pass the binary directory by argument to the script, but this seems a bit unintuitive for users that try to run the example.

Does this answer your questions?

LABELS example
RUN_SERIAL ON)
endforeach()
1 change: 1 addition & 0 deletions changelog-entries/215.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Changed the minimum required CMake version to 3.22.
Loading