Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ language: c

addons:
apt:
packages: [ cpanminus ]
packages: [ cpanminus lcov ]
homebrew:
packages: [ cpanminus ]

Expand All @@ -19,7 +19,8 @@ env:

matrix:
include:
- os: linux
- env: COV=-DCODE_COVERAGE=ON
os: linux
compiler: gcc
- env: LABEL="linux-ppc64le" CMAKE_VERSION=3.15.1
os: linux-ppc64le
Expand Down Expand Up @@ -49,6 +50,12 @@ script:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export DYLD_LIBRARY_PATH="${PREFIX}/lib:${DYLD_LIBRARY_PATH:-}"; fi
- mkdir build
- cd build
- cmake -DOPENSSL_ROOT_DIR=${PREFIX} -DOPENSSL_LIBRARIES=${PREFIX}/lib -DOPENSSL_ENGINES_DIR=${PREFIX}/engines ${ASAN} ..
- cmake -DOPENSSL_ROOT_DIR=${PREFIX} -DOPENSSL_LIBRARIES=${PREFIX}/lib -DOPENSSL_ENGINES_DIR=${PREFIX}/engines ${ASAN} ${COV} ..
- if [ ! -z ${COVERITY_SCAN_TOKEN+x} -a "${RUN_COVERITY}" = "1" ]; then curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || true; else make; fi
- make test CTEST_OUTPUT_ON_FAILURE=1

after_success:
- lcov --capture --directory . --output-file coverage.info
- lcov --remove coverage.info '/usr/*' --output-file coverage.info
- lcov --list coverage.info
- bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ if (ASAN)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -g3 -fno-omit-frame-pointer")
endif()

option(CODE_COVERAGE "Enable coverage reporting" OFF)
if (CODE_COVERAGE)
message(STATUS "Code coverage enabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
endif(CODE_COVERAGE)

set(CMAKE_C_STANDARD 90)
CHECK_FUNCTION_EXISTS(clock_gettime HAVE_CLOCK_GETTIME_C)
CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_CLOCK_GETTIME_RT)
Expand Down
1 change: 1 addition & 0 deletions test_curves.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ int main(int argc, char **argv)

struct test_curve *tc;
for (tc = test_curves; tc->nid; tc++) {
// ret |= parameter_test(tc);
ret |= parameter_test(tc);
}

Expand Down