mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
enables coverage generation again (but uses guard)
This commit is contained in:
parent
8ede6595d9
commit
9434991184
12
.travis.yml
12
.travis.yml
@ -16,13 +16,13 @@ env:
|
|||||||
- PARALLELMFLAGS="-j4"
|
- PARALLELMFLAGS="-j4"
|
||||||
- PORTABLE_WORSPACE=1
|
- PORTABLE_WORSPACE=1
|
||||||
matrix:
|
matrix:
|
||||||
- BUILDTYPE=Debug MARCH=amd64 CHECK_TARGET=memcheck
|
- BUILDTYPE=Debug MARCH=amd64 CHECK_TARGET=memcheck COVERAGE=ON
|
||||||
- BUILDTYPE=Release MARCH=amd64 CHECK_TARGET=memcheck
|
- BUILDTYPE=Release MARCH=amd64 CHECK_TARGET=memcheck COVERAGE=OFF
|
||||||
- BUILDTYPE=Debug MARCH=arm32v7 CHECK_TARGET=check
|
- BUILDTYPE=Debug MARCH=arm32v7 CHECK_TARGET=check COVERAGE=OFF
|
||||||
- BUILDTYPE=MinSizeRel MARCH=arm32v7 CHECK_TARGET=check
|
- BUILDTYPE=MinSizeRel MARCH=arm32v7 CHECK_TARGET=check COVERAGE=OFF
|
||||||
before_script:
|
before_script:
|
||||||
- make BUILDTYPE=$BUILDTYPE MARCH=$MARCH
|
- make BUILDTYPE=$BUILDTYPE MARCH=$MARCH COVERAGE=$COVERAGE
|
||||||
script:
|
script:
|
||||||
- make BUILDTYPE=$BUILDTYPE MARCH=$MARCH $CHECK_TARGET
|
- make BUILDTYPE=$BUILDTYPE MARCH=$MARCH COVERAGE=$COVERAGE $CHECK_TARGET
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
|
@ -3,6 +3,7 @@ project(webfuse VERSION 0.2.0 DESCRIPTION "Websocket filesystem based on libfuse
|
|||||||
|
|
||||||
option(WITHOUT_TESTS "disable unit tests" OFF)
|
option(WITHOUT_TESTS "disable unit tests" OFF)
|
||||||
option(WITHOUT_EXAMPLE "disable example" OFF)
|
option(WITHOUT_EXAMPLE "disable example" OFF)
|
||||||
|
option(WITH_COVERAGE "enable code coverage" OFF)
|
||||||
|
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
@ -22,24 +23,24 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||||||
set(C_WARNINGS -Wall -Wextra)
|
set(C_WARNINGS -Wall -Wextra)
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
|
||||||
#if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
if(("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") AND WITHOUT_COVERAGE)
|
||||||
#
|
|
||||||
#add_definitions(
|
|
||||||
# -pg
|
|
||||||
# --coverage
|
|
||||||
# -fprofile-arcs
|
|
||||||
# -ftest-coverage
|
|
||||||
#)
|
|
||||||
|
|
||||||
#if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
add_definitions(
|
||||||
# link_libraries(gcov)
|
-pg
|
||||||
#else()
|
--coverage
|
||||||
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
|
-fprofile-arcs
|
||||||
#endif()
|
-ftest-coverage
|
||||||
|
)
|
||||||
|
|
||||||
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg -fprofile-arcs")
|
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||||
|
link_libraries(gcov)
|
||||||
|
else()
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
|
||||||
|
endif()
|
||||||
|
|
||||||
#endif()
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg -fprofile-arcs")
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
"include"
|
"include"
|
||||||
|
3
Makefile
3
Makefile
@ -23,6 +23,7 @@ SCRIPTDIR ?= $(PROJECTDIR)/build/mkdocker
|
|||||||
OUTDIR ?= $(PROJECTDIR)/.build
|
OUTDIR ?= $(PROJECTDIR)/.build
|
||||||
FETCHDIR ?= $(PROJECTDIR)/.deps
|
FETCHDIR ?= $(PROJECTDIR)/.deps
|
||||||
BUILDTYPE ?= Debug
|
BUILDTYPE ?= Debug
|
||||||
|
COVERAGE ?= OFF
|
||||||
|
|
||||||
SKIP_FETCH ?=
|
SKIP_FETCH ?=
|
||||||
|
|
||||||
@ -115,6 +116,8 @@ OUTDIRS += $(OUTDIR)/src
|
|||||||
EXTRACT_TARGETS += $(OUTDIR)/docker/qemu-arm-static-$(QEMU_VERSION)
|
EXTRACT_TARGETS += $(OUTDIR)/docker/qemu-arm-static-$(QEMU_VERSION)
|
||||||
EXTRACT_TARGETS += $(patsubst $(FETCHDIR)/%.tar.gz,$(OUTDIR)/src/%,$(FETCH_TARGETS))
|
EXTRACT_TARGETS += $(patsubst $(FETCHDIR)/%.tar.gz,$(OUTDIR)/src/%,$(FETCH_TARGETS))
|
||||||
|
|
||||||
|
CMAKEFLAGS += -DWITH_COVERAGE=$(COVERAGE)
|
||||||
|
|
||||||
#######################################################################################################################
|
#######################################################################################################################
|
||||||
# Makefile dependencies
|
# Makefile dependencies
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user