unit test build times (#3489)

* don't emit assembly listings

* more

* extract coverage

* link coverage
This commit is contained in:
Matthew Kennedy 2021-11-06 18:20:24 -07:00 committed by GitHub
parent 3f278e989b
commit 8124c2a12d
3 changed files with 15 additions and 9 deletions

View File

@ -52,7 +52,7 @@ jobs:
- name: Build Tests
working-directory: ./unit_tests/
run: make -j4
run: make -j4 COVERAGE=yes
- name: Run Tests
working-directory: ./unit_tests/

View File

@ -65,18 +65,18 @@ endif
ifeq ($(IS_MAC),yes)
ODFLAGS = -x --syms
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
ASXFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS)
ASFLAGS = $(MCFLAGS) -Wa $(ADEFS)
ASXFLAGS = $(MCFLAGS) -Wa $(ADEFS)
CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) $(DEFS)
CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) $(DEFS)
LDFLAGS = $(MCFLAGS) $(LLIBDIR)
else
# not mac
ODFLAGS = -x --syms
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
ASXFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS)
CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS)
CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.cpp=.lst)) $(DEFS)
ASFLAGS = $(MCFLAGS) $(ADEFS)
ASXFLAGS = $(MCFLAGS) $(ADEFS)
CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) $(DEFS)
CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) $(DEFS)
ifeq ($(USE_LINK_GC),yes)
LDFLAGS = $(MCFLAGS) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LLIBDIR)
else

View File

@ -18,10 +18,13 @@ ifeq ($(USE_OPT),)
# -O2 is needed for mingw, without it there is a linking issue to isnanf?!?!
#USE_OPT = $(RFLAGS) -O2 -fgnu89-inline -ggdb -fomit-frame-pointer -falign-functions=16 -std=gnu99 -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers
USE_OPT = -c -Wall -O0 -ggdb -g
USE_OPT += -fprofile-arcs -ftest-coverage
USE_OPT += -Werror=missing-field-initializers
endif
ifeq ($(COVERAGE),yes)
USE_OPT += -fprofile-arcs -ftest-coverage
endif
#TODO! this is a nice goal
#USE_OPT += $(RUSEFI_OPT)
@ -180,7 +183,10 @@ ULIBDIR =
# List all user libraries here
ULIBS = -lm
ULIBS += --coverage
ifeq ($(COVERAGE),yes)
ULIBS += --coverage
endif
ifneq ($(OS),Windows_NT)
ULIBS += -fsanitize=address