diff options
author | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2012-11-22 17:04:03 -0300 |
---|---|---|
committer | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2012-11-22 17:04:03 -0300 |
commit | 560f14fe8484c0b0cf935147a050ab9df241b2a9 (patch) | |
tree | a3e53dd835588176b007c8a77b88377e49c04f64 | |
parent | 04391e9723278f8bb0a0985abd50aa9c3455980d (diff) | |
download | qmenumodel-560f14fe8484c0b0cf935147a050ab9df241b2a9.tar.gz qmenumodel-560f14fe8484c0b0cf935147a050ab9df241b2a9.tar.bz2 qmenumodel-560f14fe8484c0b0cf935147a050ab9df241b2a9.zip |
Added 'TEST_XML_OUTPUT' option on cmake to enable/disalbe test output in xml.
OBS: The default value is On.
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/client/CMakeLists.txt | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f60630..f3799b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,7 @@ endif() add_subdirectory(libqmenumodel) # Tests Tools +OPTION(TEST_XML_OUTPUT "Print test results on xml files" ON) if(NOT DBUS_RUNNER) message(STATUS "dbus-test-runner not found tests disabled.") else() diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt index d946fad..392437c 100644 --- a/tests/client/CMakeLists.txt +++ b/tests/client/CMakeLists.txt @@ -8,9 +8,15 @@ macro(declare_test testname) ${GIO_LDFLAGS}
)
+ if(TEST_XML_OUTPUT)
+ set(TEST_ARGS -p -xunitxml -p -o -p test_${testname}.xml)
+ else()
+ set(TEST_ARGS "")
+ endif()
+
add_test(${testname}
${DBUS_RUNNER}
- --task ${CMAKE_CURRENT_BINARY_DIR}/${testname} -p -xunitxml -p -o -p test_${testname}.xml --task-name Client
+ --task ${CMAKE_CURRENT_BINARY_DIR}/${testname} ${TEST_ARGS} --task-name Client
--task ${CMAKE_CURRENT_SOURCE_DIR}/script_${testname}.py --task-name Server
--ignore-return)
set_tests_properties(${testname} PROPERTIES
|