From 50600e1d4d8d39f487a8bc56671a973495927c1d Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 17:49:11 +0100 Subject: Rename coverage option name. --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 261335a..f90507e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,16 +16,16 @@ add_definitions(-DQT_NO_KEYWORDS) find_program(DBUS_RUNNER dbus-test-runner) # Cooverage tools -OPTION(BUILD_WITH_COVERAGE "Build with coverage analysis support" OFF) -if(BUILD_WITH_COVERAGE) +OPTION(ENABLE_COVERAGE "Build with coverage analysis support" OFF) +if(ENABLE_COVERAGE) message(STATUS "Using coverage flags") find_program(COVERAGE_COMMAND gcov) if(NOT COVERAGE_COMMAND) message(FATAL_ERROR "gcov command not found") endif() - SET(CMAKE_C_FLAGS "-g -O0 -Wall -fprofile-arcs -ftest-coverage") - SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -fprofile-arcs -ftest-coverage") - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage -lgcov") + SET(CMAKE_C_FLAGS "-g -O0 -Wall --coverage") + SET(CMAKE_CXX_FLAGS "-g -O0 -Wall --coverage") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage") include(${CMAKE_SOURCE_DIR}/cmake/lcov.cmake) endif() -- cgit v1.2.3 From 79c1256b0994ad9673989a288363c88a66cb7766 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 7 Nov 2012 08:35:52 -0300 Subject: Updated tests make file to outpu xml results files. --- tests/client/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt index 9bce370..e9f95fd 100644 --- a/tests/client/CMakeLists.txt +++ b/tests/client/CMakeLists.txt @@ -10,7 +10,7 @@ macro(declare_test testname) add_test(${testname} ${DBUS_RUNNER} - --task ${CMAKE_CURRENT_BINARY_DIR}/${testname} --task-name Client + --task ${CMAKE_CURRENT_BINARY_DIR}/${testname} -p -xunitxml -p -o -p test_${testname}.xml --task-name Client --task ${CMAKE_CURRENT_SOURCE_DIR}/script_${testname}.py --task-name Server --ignore-return) set_tests_properties(${testname} PROPERTIES -- cgit v1.2.3 From 6b8fd9e811965a88d81e9ff2424c8885c66f6b7f Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 7 Nov 2012 09:07:59 -0300 Subject: Updated README file with the new coverage flag. --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index e8e6b75..fb519df 100644 --- a/README +++ b/README @@ -26,10 +26,10 @@ installed, install it and then re-run cmake. Then run either of these commands: = Getting code coverage information = To run the unit tests and generate code coverage information, you need to re-run -cmake with BUILD_WITH_COVERAGE set to ON and then invoke `make lcov`. +cmake with ENABLE_COVERAGE set to ON and then invoke `make lcov`. This requires lcov to be installed. - $ cmake -DBUILD_WITH_COVERAGE=ON . + $ cmake -DENABLE_COVERAGE=ON . $ make lcov This will generate a report (coverage/index.html) which you can view in a -- cgit v1.2.3 From 9dd5954c2d088822e56009247ac24fcc8b72f73b Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 7 Nov 2012 09:08:57 -0300 Subject: Appended auto generated xml test output files into ignored list. --- .bzrignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.bzrignore b/.bzrignore index 2d8eae1..9038e8d 100644 --- a/.bzrignore +++ b/.bzrignore @@ -22,6 +22,7 @@ tests/client/modeltest tests/client/qmlfiles.h tests/client/qmltest tests/client/servicetest +tests/client/test_*.xml tests/script/__pycache__/ doc/html/ -- cgit v1.2.3 From 664f1624e119c694aea2ed2ccd7e567594d0c069 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 7 Nov 2012 09:16:24 -0300 Subject: Make the rule 'make check' always enabled. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cd501b..eb25369 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,11 +35,12 @@ add_subdirectory(libqmenumodel) if(NOT DBUS_RUNNER) message(STATUS "dbus-test-runner not found tests disabled.") else() + # We need to enable test to create the 'make check' target mandatory on jenkins + enable_testing() if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") message(STATUS "Current version of qemu crashes during the tests. We will skip it for now.") else() - message(STATUS "Enable tests for: ${CMAKE_SYSTEM_PROCESSOR}") - enable_testing() + message(STATUS "Tests enabled for arch: ${CMAKE_SYSTEM_PROCESSOR}") add_subdirectory(tests) endif() endif() -- cgit v1.2.3