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

ENH: Streamline test execution setting launch environment #1168

Merged
merged 3 commits into from
Jan 13, 2024

Conversation

jcfr
Copy link
Member

@jcfr jcfr commented Jan 13, 2024

Update "simple_test" and "simple_test_with_data" macros by setting the ENVIRONMENT_MODIFICATION test property with the CTK_TEST_LAUNCH_BUILD_ENVIRONMENT_MODIFICATION variable.

The CTK_TEST_LAUNCH_BUILD_ENVIRONMENT_MODIFICATION variable list the environment modifications for each environment variables PATH, LD_LIBRARY_PATH and/or DYLD_LIBRARY_PATH based on the list of paths and library paths associated with dependencies. This includes Qt and any enabled external projects.

To streamline the process of gathering external project-specific "library paths" and "paths", these are now individually defined within each external project and linked to a label associated with the corresponding mark_as_superbuild() call.

Related:


Prior attempt at setting the ENVIRONMENT test property failed on windows as there was no way of defining the PATH variable. The use of ; (or even the $<SEMICOLON> generator expression) did not allow to set PATH with multiple values.

@jcfr jcfr force-pushed the set-test-launch-environment branch 5 times, most recently from a107804 to 9c609db Compare January 13, 2024 06:44
Update "simple_test" and "simple_test_with_data" macros settings
the `ENVIRONMENT` test property using `CTK_TEST_LAUNCH_BUILD_ENVIRONMENT`
variable.

Set `CTK_TEST_LAUNCH_BUILD_ENVIRONMENT` variable defines the environment
variables `PATH`, `LD_LIBRARY_PATH` and/or `DYLD_LIBRARY_PATH` based on
the list of paths and library paths associated with dependencies. This
includes Qt and any enabled external projects.

To streamline the process of gathering external project-specific "library paths"
and "paths", these are now individually defined within each external project
and linked to a label associated with the corresponding `mark_as_superbuild()`
call.
@jcfr jcfr force-pushed the set-test-launch-environment branch from 9c609db to f8b09ce Compare January 13, 2024 06:54
@jcfr jcfr force-pushed the set-test-launch-environment branch from 5f13254 to a91ebcf Compare January 13, 2024 08:45
@jcfr jcfr merged commit c1d55a1 into commontk:master Jan 13, 2024
5 checks passed
@jcfr jcfr deleted the set-test-launch-environment branch January 13, 2024 09:36
jcfr added a commit to jcfr/CTK that referenced this pull request Jan 13, 2024
In commit 0f5da46 ("ENH: Update ctkDICOMTester to lookup DCMTK executables
in build tree", 2024-01-12), the directory for searching DCMTK binaries was
changed from an install tree to a build tree. While this change was effective
for single config builds, it failed in the case of multi-config builds where
the exectuables are generated in sub-directories like "Release", "RelWithDebInfo",
"MinSizeRel", or "Debug".

Following commit c1d55a1 ("ENH: Streamline test execution setting launch
environment (commontk#1168)," 2024-01-13), tests began executing with an updated
PATH environment variable. To address the issue, we now expect DCMTK binaries
to be automatically located in the PATH.
jcfr added a commit to jcfr/CTK that referenced this pull request Jan 13, 2024
…build tree

In commit 2583a4e ("Remove empty build command and set install command
empty.", 2014-11-04), the systematic installation of DCMTK during CTK
superbuild was disabled. To support looking up binaries in the build tree,
commit 0f5da46 ("ENH: Update ctkDICOMTester to lookup DCMTK executables in
build tree", 2024-01-12), the directory for searching DCMTK binaries was
changed from an install tree to a build tree. While this change was effective
for single config builds, it failed in the case of multi-config builds where
the exectuables are generated in sub-directories like "Release", "RelWithDebInfo",
"MinSizeRel", or "Debug".

Following commit c1d55a1 ("ENH: Streamline test execution setting launch
environment (commontk#1168)," 2024-01-13), tests began executing with an updated
PATH environment variable. To address the issue, we now expect DCMTK binaries
to be automatically located in the PATH.
jcfr added a commit that referenced this pull request Jan 13, 2024
…build tree

In commit 2583a4e ("Remove empty build command and set install command
empty.", 2014-11-04), the systematic installation of DCMTK during CTK
superbuild was disabled. To support looking up binaries in the build tree,
commit 0f5da46 ("ENH: Update ctkDICOMTester to lookup DCMTK executables in
build tree", 2024-01-12), the directory for searching DCMTK binaries was
changed from an install tree to a build tree. While this change was effective
for single config builds, it failed in the case of multi-config builds where
the exectuables are generated in sub-directories like "Release", "RelWithDebInfo",
"MinSizeRel", or "Debug".

Following commit c1d55a1 ("ENH: Streamline test execution setting launch
environment (#1168)," 2024-01-13), tests began executing with an updated
PATH environment variable. To address the issue, we now expect DCMTK binaries
to be automatically located in the PATH.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant