From 06666eeb3afe9792b03dc46bc0adc496127b29a7 Mon Sep 17 00:00:00 2001 From: george Date: Sun, 8 May 2016 15:18:48 -0700 Subject: [PATCH] add code coverage report --- .coveralls.yml | 1 + .travis.yml | 8 ++++++++ src/task/gtest/cxx/cxx_file_crc_task-utest.cpp | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..341a08f --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +repo_token: 9maTZamdcMQ33JqgPXV9BgmzyvTTpXyiC diff --git a/.travis.yml b/.travis.yml index 3936387..8e6e403 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,13 +23,21 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install gcc-4.8 g++-4.8 -y ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install lcov ; fi + - ./prepare.sh install: + - gem install coveralls-lcov script: ./build.sh && ./self-build.sh +after_success: + - lcov --directory build --base-directory src --capture --no-external --output-file coverage.info # capture coverage info + - lcov --list coverage.info # debug before upload + - coveralls-lcov coverage.info # uploads to coveralls + cache: directories: - iwyu diff --git a/src/task/gtest/cxx/cxx_file_crc_task-utest.cpp b/src/task/gtest/cxx/cxx_file_crc_task-utest.cpp index 20e238d..b3d57ff 100644 --- a/src/task/gtest/cxx/cxx_file_crc_task-utest.cpp +++ b/src/task/gtest/cxx/cxx_file_crc_task-utest.cpp @@ -121,7 +121,7 @@ TEST_F(CxxFileCrcTaskTest, SLOW_includeFromOneDirectory) EXPECT_EQ(0xb7e440100a03d2c5, task->crc()) << std::hex << task->crc(); } -TEST_F(CxxFileCrcTaskTest, includeFromTwoDirectories) +TEST_F(CxxFileCrcTaskTest, VERYSLOW_includeFromTwoDirectories) { // This test makes sure that including from having more than one include directory // with the same fs directory is working.