From 01ef1191b0171b5a40762d88242100f813db7229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Tue, 11 Oct 2022 17:36:42 +0000 Subject: [PATCH] Fix test_motion_ramp on Windows * 'python3' is not valid on Windows * call the .py file with 'python' command to prevent BAD_COMMAND error --- tests/unit/modules/motion/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/modules/motion/CMakeLists.txt b/tests/unit/modules/motion/CMakeLists.txt index 5453640..a5712d0 100644 --- a/tests/unit/modules/motion/CMakeLists.txt +++ b/tests/unit/modules/motion/CMakeLists.txt @@ -24,13 +24,13 @@ add_test(NAME motion::rampgen COMMAND rampgen ramp_data.txt) add_dependencies(tests rampgen) execute_process( - COMMAND python3 -c "import pandas" + COMMAND "${Python3_EXECUTABLE}" -c "import pandas" RESULT_VARIABLE PANDAS_INSTALLED OUTPUT_QUIET ERROR_QUIET ) if(${PANDAS_INSTALLED} EQUAL 0) # only run test_motion_ramp if pandas is installed - add_test(NAME motion::test_motion_ramp COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test_motion_ramp.py + add_test(NAME motion::test_motion_ramp COMMAND "${Python3_EXECUTABLE}" ${CMAKE_CURRENT_SOURCE_DIR}/test_motion_ramp.py ramp_data.txt )