fix(test): compilation and deps
This commit is contained in:
parent
ad4df3a580
commit
7304ec95f3
2 changed files with 8 additions and 3 deletions
5
Makefile
5
Makefile
|
|
@ -114,10 +114,11 @@ else
|
|||
endif
|
||||
@echo "[OK] All tests passed"
|
||||
|
||||
$(TEST_BIN): $(TESTS) $(filter-out $(OBJ_DIR)/main.o,$(OBJS)) $(LIBICMP_DEP)
|
||||
|
||||
$(TEST_BIN): $(VERSION_HEADER) $(TESTS) $(filter-out $(OBJ_DIR)/main.o,$(OBJS)) $(LIBICMP_DEP)
|
||||
@mkdir -p $(dir $@)
|
||||
@echo "[BUILD] Building test binary..."
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) $(TEST_LDFLAGS) -o $@
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(filter-out $(VERSION_HEADER),$^) $(LDFLAGS) $(TEST_LDFLAGS) -o $@
|
||||
else
|
||||
test:
|
||||
@echo "[SKIP] Tests are disabled"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
#include <criterion/criterion.h>
|
||||
#include "version_gen.h"
|
||||
|
||||
t_prog_name g_prog_name = { NULL, NULL };
|
||||
|
||||
Test(dummy, always_pass)
|
||||
{
|
||||
cr_assert(0, "Hello, world!");
|
||||
cr_assert(1, "Hello, world!");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue