diff options
author | Christoph Koehler <christoph@zerodeviation.net> | 2021-10-28 09:18:14 -0600 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-11-17 06:54:30 -0500 |
commit | c7390f29c7047ed00df3831e83998ccf3a72a8bb (patch) | |
tree | 139b0d7d976bc9bd63408994741c29419c537753 /cmake | |
parent | 04cf420fba239945fe19b8f7dbe700ef306317b8 (diff) |
modtool,cmake: make module dir for tests
Creates a python module in the build tree for tests to import.
Addresses #3999 and #4825
Signed-off-by: Christoph Koehler <christoph@zerodeviation.net>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/GrTest.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake index 8a98478974..7be65492ee 100644 --- a/cmake/Modules/GrTest.cmake +++ b/cmake/Modules/GrTest.cmake @@ -61,6 +61,10 @@ function(GR_ADD_TEST test_name) # Keep the original path conversion for pypath - the above commented line breaks CI tests file(TO_NATIVE_PATH "${GR_TEST_PYTHON_DIRS}" pypath) #ok to use on dir list? + # add test module directory to PYTHONPATH to allow CTest to find QA test modules. + # We add it to the beginning of the list to use locally-built modules before installed ones. + list(INSERT pypath 0 "${CMAKE_BINARY_DIR}/test_modules") + set(environs "VOLK_GENERIC=1" "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}" "GR_CONF_CONTROLPORT_ON=False") list(APPEND environs ${GR_TEST_ENVIRONS}) |