summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2020-05-18 13:15:33 +0800
committerMartin Michlmayr <tbm@cyrius.com>2020-05-18 13:15:33 +0800
commit87475cba0c753cb31d912b18d2b9e82d83a9b01c (patch)
tree64e28424b6160a5a22c7f2d03ca8b602f31c8129 /test
parent7f78cadea4a2359f1f53ce9c0c66b6d3fafd81c4 (diff)
downloadfork-ledger-87475cba0c753cb31d912b18d2b9e82d83a9b01c.tar.gz
fork-ledger-87475cba0c753cb31d912b18d2b9e82d83a9b01c.tar.bz2
fork-ledger-87475cba0c753cb31d912b18d2b9e82d83a9b01c.zip
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
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt12
1 files changed, 7 insertions, 5 deletions
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