diff options
author | Andy Clayton <q3aiml@gmail.com> | 2020-05-17 15:02:53 -0500 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2020-05-18 12:28:29 +0800 |
commit | 92b6072ffd0744f3c949cbe9eb82c23db9fc44c9 (patch) | |
tree | 7f9677e0557d971d1c3e233488b3773a1fbb88a4 | |
parent | 54d6128e2a7792726d6080e415636186117be363 (diff) | |
download | fork-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.
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | test/CMakeLists.txt | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 6837e5c6..e56fcf30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -66,7 +66,6 @@ before_script: script: - ctest --output-on-failure - - PYTHONPATH=. `cmake -LA . | sed -n 's/Python_EXECUTABLE:FILEPATH=//p'` python/demo.py notifications: email: 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 |