]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
modify the coveralls configuration file 541/head
authordota17 <chenguopingdota@163.com>
Wed, 19 Feb 2020 10:13:28 +0000 (18:13 +0800)
committerdota17 <chenguopingdota@163.com>
Mon, 23 Mar 2020 03:38:18 +0000 (11:38 +0800)
.travis.yml
CMakeLists.txt

index f07c34229d86c3e9c3790276b3da18d9edd2debd..2278b1bb27f026a211b823c0e4d0e70bb087942c 100644 (file)
@@ -78,22 +78,33 @@ matrix:
       osx_image: xcode10.1\r
       env: XCODE="true" CHECK="true"\r
 \r
-#   run coveralls\r
+# run coveralls\r
     - os: linux\r
       dist: xenial\r
       compiler: gcc\r
       env: CHECK="true"\r
+      install:\r
+        - sh autogen.sh\r
       before_install:\r
         - sudo pip install cpp-coveralls\r
+        - echo $CC\r
+        - echo $LANG\r
+        - echo $LC_ALL\r
+        - set -e\r
+        - if [ "$TRAVIS_OS_NAME" = "linux" ]; then\r
+            eval "${MATRIX_EVAL}";\r
+            if [ -n "$MATRIX_EVAL" ] && [ "$TRAVIS_COMPILER" != "clang" ]; then\r
+              sudo apt-get install -y $CC;\r
+            fi;\r
+          fi\r
+      before_script:\r
+        - export CFLAGS="-fprofile-arcs -ftest-coverage"\r
+        - ./configure\r
       script:\r
-        - mkdir build\r
-        - cd build\r
-        - cmake ..\r
         - make\r
-        - make test\r
-        - cd -\r
+        - make check\r
       after_success:\r
-        - 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\r
+        - coveralls --exclude tests --exclude fuzz\r
 \r
 #  allow_failures:\r
 #    - os: osx\r
index 296ac137514a83b4badd01dcf786a709d0a38f6d..0008cbbe9f6ec90bdefcced02d836daca7111af2 100644 (file)
@@ -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()