summaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2019-12-06 13:07:30 +0000
committerJohn Wiegley <johnw@newartisans.com>2019-12-06 14:18:08 +0100
commit139beba6e99729f1c10a9e95221478f932331a02 (patch)
tree90672e3771a913a653b408f82c0813faeec9bcb1 /test/CMakeLists.txt
parentf77bdf19c307811d4659b6e85d147cdd5eee5ef3 (diff)
downloadfork-ledger-139beba6e99729f1c10a9e95221478f932331a02.tar.gz
fork-ledger-139beba6e99729f1c10a9e95221478f932331a02.tar.bz2
fork-ledger-139beba6e99729f1c10a9e95221478f932331a02.zip
test: Unbreak one more test case with python3 bridge
python3 has buffered output by default, hence testcase option_py returned no output when executed under test harness. I think this is a real problem in the way python interpreter is embeded, and i.e. stdout is not flushed until after test case has died. However, running things unbuffered seems to make everything work. But for some reason I had to adjust 1057.test slightly. I have no idea what those numbers mean, and if running things unbuffered break stuff.
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 867abbd4..2baa99ae 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -26,7 +26,7 @@ macro(add_ledger_harness_tests _class)
$<TARGET_FILE:ledger> ${PROJECT_SOURCE_DIR}
${TestFile} ${TEST_PYTHON_FLAGS})
set_tests_properties(${_class}Test_${TestFile_Name}
- PROPERTIES ENVIRONMENT "TZ=${Ledger_TEST_TIMEZONE}")
+ PROPERTIES ENVIRONMENT "PYTHONUNBUFFERED=1 TZ=${Ledger_TEST_TIMEZONE}")
endif()
endforeach()
endif()
@@ -45,7 +45,7 @@ if (Python_EXECUTABLE)
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/${_class}.py
--ledger $<TARGET_FILE:ledger> --file ${TestFile})
set_tests_properties(${_class}Test_${TestFile_Name}
- PROPERTIES ENVIRONMENT "TZ=${Ledger_TEST_TIMEZONE}")
+ PROPERTIES ENVIRONMENT "PYTHONUNBUFFERED=1 TZ=${Ledger_TEST_TIMEZONE}")
endforeach()
# CheckManpage and CheckTexinfo are disabled, since they do not work
@@ -56,7 +56,7 @@ if (Python_EXECUTABLE)
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/${_class}.py
--ledger $<TARGET_FILE:ledger> --source ${PROJECT_SOURCE_DIR})
set_tests_properties(${_class}
- PROPERTIES ENVIRONMENT "TZ=${Ledger_TEST_TIMEZONE}")
+ PROPERTIES ENVIRONMENT "PYTHONUNBUFFERED=1 TZ=${Ledger_TEST_TIMEZONE}")
endforeach()
endif()