summaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorAndy Clayton <q3aiml@gmail.com>2020-05-17 15:02:53 -0500
committerMartin Michlmayr <tbm@cyrius.com>2020-05-18 12:28:29 +0800
commit92b6072ffd0744f3c949cbe9eb82c23db9fc44c9 (patch)
tree7f9677e0557d971d1c3e233488b3773a1fbb88a4 /test/CMakeLists.txt
parent54d6128e2a7792726d6080e415636186117be363 (diff)
downloadfork-ledger-92b6072ffd0744f3c949cbe9eb82c23db9fc44c9.tar.gz
fork-ledger-92b6072ffd0744f3c949cbe9eb82c23db9fc44c9.tar.bz2
fork-ledger-92b6072ffd0744f3c949cbe9eb82c23db9fc44c9.zip
run demo.py with ctest
Fix error from newer cmake/FindPython versions not printing internal Python_EXECUTABLE variable.
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c1dde710..347e4603 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -66,6 +66,12 @@ if (Python_EXECUTABLE)
set_tests_properties(${_class}
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=.")
endif()
### CMakeLists.txt ends here