diff options
author | Vasil Velichkov <vvvelichkov@gmail.com> | 2020-06-05 02:35:27 +0300 |
---|---|---|
committer | Andrej Rode <mail@andrejro.de> | 2020-10-16 17:43:38 +0200 |
commit | cf5264adf550ced75dc8262b71ae365707a63cc1 (patch) | |
tree | 0fb596d171bcc5879a6b591fac7faba016ffa08a | |
parent | 3e51cee3cd33791658f7b56cf35ffc4cac150922 (diff) |
qa: Run qtgui tests with xvfb-run when needed
If running on Linux, the DISPLAY environment variable is not set and
xvfb-run is present then run the Qt tests with xvfb-run. This would
allows running the Qt test in the gnuradio's CI.
-rw-r--r-- | gr-qtgui/python/qtgui/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gr-qtgui/python/qtgui/CMakeLists.txt b/gr-qtgui/python/qtgui/CMakeLists.txt index 09031cbc36..b7c4817e7d 100644 --- a/gr-qtgui/python/qtgui/CMakeLists.txt +++ b/gr-qtgui/python/qtgui/CMakeLists.txt @@ -46,11 +46,18 @@ if(ENABLE_TESTING) ${CMAKE_BINARY_DIR}/gnuradio-runtime/python ) + if(LINUX AND NOT DEFINED ENV{DISPLAY}) + find_program(XVFB_EXECUTABLE xvfb-run) + if(XVFB_EXECUTABLE) + set(QA_DISPLAY_SERVER "${XVFB_EXECUTABLE}") + endif() + endif() + include(GrTest) file(GLOB py_qa_test_files "qa_*.py") foreach(py_qa_test_file ${py_qa_test_files}) get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE) - GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file}) + GR_ADD_TEST(${py_qa_test_name} ${QA_DISPLAY_SERVER} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING) |