From: dota17 Date: Wed, 19 Feb 2020 10:13:28 +0000 (+0800) Subject: modify the coveralls configuration file X-Git-Tag: json-c-0.14-20200419~46^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F541%2Fhead;p=thirdparty%2Fjson-c.git modify the coveralls configuration file --- diff --git a/.travis.yml b/.travis.yml index f07c3422..2278b1bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -78,22 +78,33 @@ matrix: osx_image: xcode10.1 env: XCODE="true" CHECK="true" -# run coveralls +# run coveralls - os: linux dist: xenial compiler: gcc env: CHECK="true" + install: + - sh autogen.sh before_install: - sudo pip install cpp-coveralls + - echo $CC + - echo $LANG + - echo $LC_ALL + - set -e + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then + eval "${MATRIX_EVAL}"; + if [ -n "$MATRIX_EVAL" ] && [ "$TRAVIS_COMPILER" != "clang" ]; then + sudo apt-get install -y $CC; + fi; + fi + before_script: + - export CFLAGS="-fprofile-arcs -ftest-coverage" + - ./configure script: - - mkdir build - - cd build - - cmake .. - make - - make test - - cd - + - make check after_success: - - coveralls --include arraylist.c --include arraylist.h --include json_object.c --include json_object.h --include json_object_iterator.c --include json_object_iterator.h --include json_object_private.h --include json_pointer.c --include json_pointer.h --include json_tokener.c --include json_tokener.h --include json_util.c --include json_util.h --include json_visit.c --include json_visit.h --include linkhash.c --include linkhash.h --include printbuf.c --include printbuf.h --include random_seed.c --include strerror_override.c + - coveralls --exclude tests --exclude fuzz # allow_failures: # - os: osx diff --git a/CMakeLists.txt b/CMakeLists.txt index 296ac137..0008cbbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,7 +197,6 @@ message(STATUS "Written ${PROJECT_BINARY_DIR}/json_config.h") if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage") if ("${DISABLE_WERROR}" STREQUAL "OFF") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") endif()