From 87475cba0c753cb31d912b18d2b9e82d83a9b01c Mon Sep 17 00:00:00 2001 From: Martin Michlmayr Date: Mon, 18 May 2020 13:15:33 +0800 Subject: run demo.py test only when Python is enabled Commit 92b6072ffd ("run demo.py with ctest") made demo.py part of the test suite. But we can only run it if Python is enabled in ledger. Fixes #1910 --- test/CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 347e4603..24be0cdf 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -67,11 +67,13 @@ if (Python_EXECUTABLE) PROPERTIES ENVIRONMENT "TZ=${Ledger_TEST_TIMEZONE}") endforeach() - add_test(NAME demo - COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/python/demo.py - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) - set_tests_properties(demo - PROPERTIES ENVIRONMENT "TZ=${Ledger_TEST_TIMEZONE};PYTHONPATH=.") + if (HAVE_BOOST_PYTHON) + add_test(NAME demo + COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/python/demo.py + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) + set_tests_properties(demo + PROPERTIES ENVIRONMENT "TZ=${Ledger_TEST_TIMEZONE};PYTHONPATH=.") + endif() endif() ### CMakeLists.txt ends here -- cgit v1.2.3