mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-08-06 13:50:49 +08:00
Remove weak linked setup/teardown from coverage build, unreachable & empty
Add config flag for 64-bit, max covered lines even with 32-bit compilers Always print uncovered lines, delete separate make target
This commit is contained in:
@ -5,7 +5,8 @@ endif
|
|||||||
#DEBUG = -O0 -g
|
#DEBUG = -O0 -g
|
||||||
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror -Wredundant-decls
|
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror -Wredundant-decls
|
||||||
CFLAGS += $(DEBUG)
|
CFLAGS += $(DEBUG)
|
||||||
DEFINES = -D UNITY_OUTPUT_CHAR=putcharSpy -D UNITY_INCLUDE_DOUBLE
|
DEFINES = -D UNITY_OUTPUT_CHAR=putcharSpy
|
||||||
|
DEFINES += -D UNITY_SUPPORT_64 -D UNITY_INCLUDE_DOUBLE -D UNITY_NO_WEAK
|
||||||
SRC = ../src/unity.c tests/testunity.c build/testunityRunner.c
|
SRC = ../src/unity.c tests/testunity.c build/testunityRunner.c
|
||||||
INC_DIR = -I ../src
|
INC_DIR = -I ../src
|
||||||
COV_FLAGS = -fprofile-arcs -ftest-coverage -I ../../src
|
COV_FLAGS = -fprofile-arcs -ftest-coverage -I ../../src
|
||||||
@ -24,8 +25,6 @@ coverage: $(BUILD_DIR)/testunityRunner.c
|
|||||||
./$(TARGET) | grep Tests -A1
|
./$(TARGET) | grep Tests -A1
|
||||||
cd $(BUILD_DIR) && \
|
cd $(BUILD_DIR) && \
|
||||||
gcov unity.c | head -3
|
gcov unity.c | head -3
|
||||||
|
|
||||||
uncovered:
|
|
||||||
grep '###' $(BUILD_DIR)/unity.c.gcov -C2 || true
|
grep '###' $(BUILD_DIR)/unity.c.gcov -C2 || true
|
||||||
|
|
||||||
test: CFLAGS += -Wbad-function-cast -Wcast-qual -Wconversion -Wformat=2 -Wold-style-definition \
|
test: CFLAGS += -Wbad-function-cast -Wcast-qual -Wconversion -Wformat=2 -Wold-style-definition \
|
||||||
|
Reference in New Issue
Block a user