Break out unit tests #2627
This commit is contained in:
parent
8b30776016
commit
5fdc1a17d3
|
@ -177,106 +177,6 @@ INCDIR = $(UNIT_TESTS_DIR) \
|
||||||
# Project, sources and paths
|
# Project, sources and paths
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Compiler settings
|
|
||||||
#
|
|
||||||
|
|
||||||
# It looks like cygwin build of mingwg-w64 has issues with gcov runtime :(
|
|
||||||
# mingw-w64 is a project which forked from mingw in 2007 - be careful not to confuse these two.
|
|
||||||
# In order to have coverage generated please download from https://mingw-w64.org/doku.php/download/mingw-builds
|
|
||||||
# Install using mingw-w64-install.exe instead of similar thing packaged with cygwin
|
|
||||||
# Both 32 bit and 64 bit versions of mingw-w64 are generating coverage data.
|
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
|
||||||
ifeq ($(USE_MINGW32_I686),)
|
|
||||||
#this one is 64 bit
|
|
||||||
TRGT = x86_64-w64-mingw32-
|
|
||||||
else
|
|
||||||
#this one was 32 bit
|
|
||||||
TRGT = i686-w64-mingw32-
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
TRGT =
|
|
||||||
endif
|
|
||||||
|
|
||||||
CC = $(CCPREFIX) $(TRGT)gcc
|
|
||||||
CPPC = $(CCPREFIX) $(TRGT)g++
|
|
||||||
# Enable loading with g++ only if you need C++ runtime support.
|
|
||||||
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
|
||||||
# runtime support makes code size explode.
|
|
||||||
#LD = $(TRGT)gcc
|
|
||||||
LD = $(TRGT)g++
|
|
||||||
CP = $(TRGT)objcopy
|
|
||||||
AS = $(TRGT)gcc -x assembler-with-cpp
|
|
||||||
OD = $(TRGT)objdump
|
|
||||||
HEX = $(CP) -O ihex
|
|
||||||
BIN = $(CP) -O binary
|
|
||||||
|
|
||||||
# ARM-specific options here
|
|
||||||
AOPT =
|
|
||||||
|
|
||||||
# THUMB-specific options here
|
|
||||||
TOPT = -mthumb -DTHUMB
|
|
||||||
|
|
||||||
# Define C warning options here
|
|
||||||
CWARN = -Wall -Wextra -Wstrict-prototypes -pedantic -Wmissing-prototypes -Wold-style-definition
|
|
||||||
|
|
||||||
# Define C++ warning options here
|
|
||||||
CPPWARN = -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable -Wno-format -Wno-unused-parameter -Wno-unused-private-field
|
|
||||||
|
|
||||||
#
|
|
||||||
# Compiler settings
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Start of default section
|
|
||||||
#
|
|
||||||
|
|
||||||
# List all default ASM defines here, like -D_DEBUG=1
|
|
||||||
DADEFS =
|
|
||||||
|
|
||||||
# List all default directories to look for include files here
|
|
||||||
DINCDIR =
|
|
||||||
|
|
||||||
# List the default directory to look for the libraries here
|
|
||||||
DLIBDIR =
|
|
||||||
|
|
||||||
# List all default libraries here
|
|
||||||
ifeq ($(OS),Windows_NT)
|
|
||||||
# Windows
|
|
||||||
DLIBS = -static-libgcc -static -static-libstdc++
|
|
||||||
else
|
|
||||||
# Linux
|
|
||||||
DLIBS = -pthread
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
|
||||||
# End of default section
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Start of user section
|
|
||||||
#
|
|
||||||
|
|
||||||
# List all user C define here, like -D_DEBUG=1
|
|
||||||
UDEFS =
|
|
||||||
|
|
||||||
# Define ASM defines here
|
|
||||||
UADEFS =
|
|
||||||
|
|
||||||
# List all user directories here
|
|
||||||
UINCDIR =
|
|
||||||
|
|
||||||
# List the user directory to look for the libraries here
|
|
||||||
ULIBDIR =
|
|
||||||
|
|
||||||
# List all user libraries here
|
|
||||||
ULIBS = -lm
|
|
||||||
ULIBS += --coverage
|
|
||||||
|
|
||||||
#
|
|
||||||
# End of user defines
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
include $(UNIT_TESTS_DIR)/unit_test_rules.mk
|
include $(UNIT_TESTS_DIR)/unit_test_rules.mk
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,104 @@
|
||||||
|
##############################################################################
|
||||||
|
# Compiler settings
|
||||||
|
#
|
||||||
|
|
||||||
|
# It looks like cygwin build of mingwg-w64 has issues with gcov runtime :(
|
||||||
|
# mingw-w64 is a project which forked from mingw in 2007 - be careful not to confuse these two.
|
||||||
|
# In order to have coverage generated please download from https://mingw-w64.org/doku.php/download/mingw-builds
|
||||||
|
# Install using mingw-w64-install.exe instead of similar thing packaged with cygwin
|
||||||
|
# Both 32 bit and 64 bit versions of mingw-w64 are generating coverage data.
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
ifeq ($(USE_MINGW32_I686),)
|
||||||
|
#this one is 64 bit
|
||||||
|
TRGT = x86_64-w64-mingw32-
|
||||||
|
else
|
||||||
|
#this one was 32 bit
|
||||||
|
TRGT = i686-w64-mingw32-
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
TRGT =
|
||||||
|
endif
|
||||||
|
|
||||||
|
CC = $(CCPREFIX) $(TRGT)gcc
|
||||||
|
CPPC = $(CCPREFIX) $(TRGT)g++
|
||||||
|
# Enable loading with g++ only if you need C++ runtime support.
|
||||||
|
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
||||||
|
# runtime support makes code size explode.
|
||||||
|
#LD = $(TRGT)gcc
|
||||||
|
LD = $(TRGT)g++
|
||||||
|
CP = $(TRGT)objcopy
|
||||||
|
AS = $(TRGT)gcc -x assembler-with-cpp
|
||||||
|
OD = $(TRGT)objdump
|
||||||
|
HEX = $(CP) -O ihex
|
||||||
|
BIN = $(CP) -O binary
|
||||||
|
|
||||||
|
# ARM-specific options here
|
||||||
|
AOPT =
|
||||||
|
|
||||||
|
# THUMB-specific options here
|
||||||
|
TOPT = -mthumb -DTHUMB
|
||||||
|
|
||||||
|
# Define C warning options here
|
||||||
|
CWARN = -Wall -Wextra -Wstrict-prototypes -pedantic -Wmissing-prototypes -Wold-style-definition
|
||||||
|
|
||||||
|
# Define C++ warning options here
|
||||||
|
CPPWARN = -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable -Wno-format -Wno-unused-parameter -Wno-unused-private-field
|
||||||
|
|
||||||
|
#
|
||||||
|
# Compiler settings
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Start of default section
|
||||||
|
#
|
||||||
|
|
||||||
|
# List all default ASM defines here, like -D_DEBUG=1
|
||||||
|
DADEFS =
|
||||||
|
|
||||||
|
# List all default directories to look for include files here
|
||||||
|
DINCDIR =
|
||||||
|
|
||||||
|
# List the default directory to look for the libraries here
|
||||||
|
DLIBDIR =
|
||||||
|
|
||||||
|
# List all default libraries here
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
# Windows
|
||||||
|
DLIBS = -static-libgcc -static -static-libstdc++
|
||||||
|
else
|
||||||
|
# Linux
|
||||||
|
DLIBS = -pthread
|
||||||
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# End of default section
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Start of user section
|
||||||
|
#
|
||||||
|
|
||||||
|
# List all user C define here, like -D_DEBUG=1
|
||||||
|
UDEFS =
|
||||||
|
|
||||||
|
# Define ASM defines here
|
||||||
|
UADEFS =
|
||||||
|
|
||||||
|
# List all user directories here
|
||||||
|
UINCDIR =
|
||||||
|
|
||||||
|
# List the user directory to look for the libraries here
|
||||||
|
ULIBDIR =
|
||||||
|
|
||||||
|
# List all user libraries here
|
||||||
|
ULIBS = -lm
|
||||||
|
ULIBS += --coverage
|
||||||
|
|
||||||
|
#
|
||||||
|
# End of user defines
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
# Define project name here
|
# Define project name here
|
||||||
PROJECT = rusefi_test
|
PROJECT = rusefi_test
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue