mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-03 07:13:51 +00:00
test/coverage: disable address sanitizer for coverage measurements
This commit is contained in:
parent
05e0a7f4e6
commit
28b5b606bb
@ -46,7 +46,7 @@ SUBDIRS_BLE = \
|
||||
le_device_db_tlv \
|
||||
linked_list \
|
||||
ring_buffer \
|
||||
security_manager \
|
||||
security_manager \
|
||||
|
||||
# test fails
|
||||
|
||||
|
@ -9,7 +9,7 @@ CFLAGS = -g -Wall \
|
||||
-I${BTSTACK_ROOT}/src
|
||||
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/rijndael
|
||||
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
|
@ -62,9 +62,9 @@ set(SOURCES
|
||||
${SOURCES_ZEPHYR}
|
||||
)
|
||||
|
||||
add_compile_options( -fsanitize=address --coverage)
|
||||
add_link_options( -fsanitize=address --coverage)
|
||||
add_definitions( -DCOVERAGE)
|
||||
add_compile_options(--coverage)
|
||||
add_link_options( --coverage)
|
||||
add_definitions( -DCOVERAGE)
|
||||
|
||||
# create static lib
|
||||
add_library(btstack STATIC ${SOURCES})
|
||||
|
@ -8,7 +8,7 @@ CFLAGS = -g -Wall \
|
||||
-I.. \
|
||||
-I${BTSTACK_ROOT}/src
|
||||
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
|
@ -6,7 +6,7 @@ BTSTACK_ROOT = ../..
|
||||
CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest
|
||||
|
||||
CFLAGS = -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
VPATH += ${BTSTACK_ROOT}/src
|
||||
|
@ -11,7 +11,7 @@ CFLAGS = -g -Wall \
|
||||
-I${BTSTACK_ROOT}/src \
|
||||
-I${BTSTACK_ROOT}/platform/posix \
|
||||
-I${BTSTACK_ROOT}/3rd-party/tinydir
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
|
@ -5,7 +5,7 @@ CC = g++
|
||||
BTSTACK_ROOT = ../..
|
||||
|
||||
CFLAGS = -g -Wall -I.. -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/include
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
VPATH += ${BTSTACK_ROOT}/src
|
||||
|
@ -10,7 +10,7 @@ CFLAGS = -g -Wall \
|
||||
-I${BTSTACK_ROOT}/src \
|
||||
-I${BTSTACK_ROOT}/platform/embedded
|
||||
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
|
||||
CFLAGS += -DHAVE_HAL_AUDIO
|
||||
|
||||
|
@ -26,7 +26,7 @@ CFLAGS = \
|
||||
-I${BTSTACK_ROOT}/src \
|
||||
-I${BTSTACK_ROOT}/platform/embedded \
|
||||
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
TESTS = tlv_test
|
||||
|
@ -5,7 +5,6 @@ CC = g++
|
||||
BTSTACK_ROOT = ../..
|
||||
|
||||
CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I${BTSTACK_ROOT}/src
|
||||
CFLAGS += -fsanitize=address
|
||||
CFLAGS += -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
@ -5,7 +5,7 @@ CC = g++
|
||||
BTSTACK_ROOT = ../..
|
||||
|
||||
CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I../ -I${BTSTACK_ROOT}/src
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
VPATH += ${BTSTACK_ROOT}/src
|
||||
|
@ -5,7 +5,7 @@ CC = g++
|
||||
BTSTACK_ROOT = ../..
|
||||
|
||||
CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I../ -I${BTSTACK_ROOT}/src
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
VPATH += ${BTSTACK_ROOT}/src
|
||||
|
@ -52,7 +52,7 @@ CFLAGS = -g -Wall -Wmissing-prototypes -Wnarrowing
|
||||
# CFLAGS += -Werror
|
||||
CFLAGS += -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/src/classic -I${POSIX_ROOT} -I${BTSTACK_ROOT}/include
|
||||
# CFLAGS += -D OCTAVE_OUTPUT
|
||||
# CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS_CPPUTEST += -lCppUTest -lCppUTestExt
|
||||
|
||||
EXAMPLES = hfp_at_parser_test hfp_ag_client_test hfp_hf_client_test cvsd_plc_test pklg_cvsd_test hfp_link_settings_test
|
||||
|
@ -8,7 +8,7 @@ CPPFLAGS = -x c++ -Wall -Wno-unused
|
||||
|
||||
CFLAGS = -DUNIT_TEST -g
|
||||
CFLAGS += -I. -I${BTSTACK_ROOT}/src
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
VPATH += ${BTSTACK_ROOT}/src
|
||||
|
||||
|
@ -38,7 +38,7 @@ CFLAGS += -g -DUNIT_TEST -Wall \
|
||||
-I$(BTSTACK_ROOT)/3rd-party/tinydir \
|
||||
-I$(BTSTACK_ROOT)/3rd-party/rijndael \
|
||||
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
|
||||
CFLAGS += -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wunused-parameter -Wredundant-decls -Wsign-compare
|
||||
|
||||
|
@ -6,7 +6,7 @@ BTSTACK_ROOT = ../..
|
||||
CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest
|
||||
|
||||
CFLAGS = -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/include
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
VPATH += ${BTSTACK_ROOT}/src/ble
|
||||
|
@ -6,7 +6,7 @@ BTSTACK_ROOT = ../..
|
||||
CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest
|
||||
|
||||
CFLAGS = -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
VPATH += ${BTSTACK_ROOT}/src
|
||||
|
@ -8,7 +8,7 @@ CFLAGS = -g -Wall \
|
||||
-I.. \
|
||||
-I${BTSTACK_ROOT}/src \
|
||||
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
|
@ -6,7 +6,7 @@ BTSTACK_ROOT = ../..
|
||||
CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest
|
||||
|
||||
CFLAGS = -g -Wall -I.. -I${BTSTACK_ROOT}/src
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
# -L$(CPPUTEST_HOME)
|
||||
|
||||
|
@ -12,7 +12,7 @@ CFLAGS += -I${BTSTACK_ROOT}/platform/embedded
|
||||
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/mbedtls/include
|
||||
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/micro-ecc
|
||||
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/rijndael
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
VPATH += ${BTSTACK_ROOT}/src
|
||||
|
@ -43,7 +43,7 @@ SM += \
|
||||
|
||||
CFLAGS += -g -std=c99 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wunused-parameter -Wredundant-decls -Wsign-compare
|
||||
CFLAGS += -D ENABLE_TESTING_SUPPORT
|
||||
|
||||
CFLAGS += -DCOVERAGE
|
||||
CFLAGS += -I.
|
||||
CFLAGS += -I${BTSTACK_ROOT}/src
|
||||
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/micro-ecc
|
||||
@ -62,8 +62,8 @@ VPATH += ${BTSTACK_ROOT}/3rd-party/rijndael
|
||||
VPATH += ${BTSTACK_ROOT}/chipset/zephyr
|
||||
|
||||
# coverage
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined -DCOVERAGE
|
||||
LDFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -fprofile-arcs -ftest-coverage
|
||||
|
||||
# use pkg-config for libusb
|
||||
CFLAGS += $(shell pkg-config libusb-1.0 --cflags)
|
||||
|
@ -25,7 +25,7 @@ CFLAGS = \
|
||||
-I${BTSTACK_ROOT}/src \
|
||||
-I${BTSTACK_ROOT}/platform/posix \
|
||||
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
||||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += -lCppUTest -lCppUTestExt
|
||||
|
||||
TESTS = tlv_test
|
||||
|
Loading…
x
Reference in New Issue
Block a user