1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-29 19:24:27 +01:00

Add configuration option UNITY_EXCLUDE_STDLIB_MALLOC to Fixture

This feature removes the dependency on malloc/free for constrained
  embedded systems without a heap. It uses a static heap inside
  Unity Fixture. Setting UNITY_INTERNAL_HEAP_SIZE_BYTES sizes the heap.
 Add tests for new option, add targets to makefile for running tests.
 UNITY_FIXTURE_MALLOC for Fixture use only, remove from unity_output_Spy.c.
This commit is contained in:
jsalling
2016-02-01 23:54:06 -06:00
parent ccb29e80c2
commit 955b221218
7 changed files with 139 additions and 15 deletions

View File

@@ -14,6 +14,22 @@ SRC = ../src/unity_fixture.c \
INC_DIR = -I../src -I../../../src/
TARGET = fixture_tests.exe
all:
all: default noStdlibMalloc 32bits
default:
$(CC) $(CFLAGS) $(DEFINES) $(SRC) $(INC_DIR) -o $(TARGET)
@ echo "default build"
./$(TARGET)
32bits:
$(CC) $(CFLAGS) $(DEFINES) $(SRC) $(INC_DIR) -o $(TARGET) -m32
@ echo "32bits build"
./$(TARGET)
noStdlibMalloc:
$(CC) $(CFLAGS) $(DEFINES) $(SRC) $(INC_DIR) -o $(TARGET) -D UNITY_EXCLUDE_STDLIB_MALLOC
@ echo "build with noStdlibMalloc"
./$(TARGET)
clangEverything:
$(CC) $(CFLAGS) $(DEFINES) $(SRC) $(INC_DIR) -o $(TARGET) -m64 -Weverything # || true #prevents make from failing