aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorChristoph Koehler <christoph@zerodeviation.net>2021-10-28 09:18:14 -0600
committermormj <34754695+mormj@users.noreply.github.com>2021-11-17 06:54:30 -0500
commitc7390f29c7047ed00df3831e83998ccf3a72a8bb (patch)
tree139b0d7d976bc9bd63408994741c29419c537753 /cmake
parentMNT: Re-rendered with conda-build 3.21.4, conda-smithy 3.14.3, and conda-forge-pinning 2021.11.11.20.25.44 (diff)
downloadgnuradio-c7390f29c7047ed00df3831e83998ccf3a72a8bb.tar.xz
gnuradio-c7390f29c7047ed00df3831e83998ccf3a72a8bb.zip
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.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake
index 8a9847897..7be65492e 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})