diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-05-18 10:31:15 +1000 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-05-18 10:31:42 +1000 |
| commit | cbd6c45887a177bd9279ce9198da0712a6417248 (patch) | |
| tree | 4a9a12ed4ad2ec4bcee19fc14ae9e2e5f19ea30a /Makefile | |
| parent | 57cd3d1fee606fd27992d3ad6be819ffbb0af001 (diff) | |
ci(coverage): Add repo coverage with codecov
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -5,7 +5,7 @@ OUTDIR = build BENCH_OUT = $(OUTDIR)/bench LIB = libtinyff.a -ALL_CFLAGS = -Wall -Wextra -Werror -std=c11 -Iinclude +ALL_CFLAGS = -Wall -Wextra -Werror -std=c11 -Iinclude --coverage DEBUG_FLAGS = -g -O0 -fno-omit-frame-pointer RELEASE_FLAGS = -O2 @@ -37,7 +37,7 @@ $(OUTDIR)/%.o: %.c $(CC) $(ALL_CFLAGS) $(CFLAGS) -c $< -o $@ clean: - rm -rf $(OUTDIR) png_test + rm -rf $(OUTDIR) png_test coverage.info .coverage debug: CFLAGS = $(DEBUG_FLAGS) debug: $(OUTDIR)/$(LIB) @@ -63,4 +63,12 @@ bench: $(OUTDIR)/$(LIB) $(CC) $(ALL_CFLAGS) $(RELEASE_FLAGS) $(BENCH_SRC) -o $(BENCH_OUT)/bench -L$(OUTDIR) -ltinyff $(BENCH_OUT)/bench -.PHONY: all clean debug release asan test test-png gdb bench
\ No newline at end of file +coverage: clean + $(MAKE) USE_HOSTED=1 debug + $(CC) $(ALL_CFLAGS) $(DEBUG_FLAGS) -DUSE_HOSTED tests/format/image/png/png_open.c -o $(OUTDIR)/png_test -L$(OUTDIR) -ltinyff + ./$(OUTDIR)/png_test || true + lcov --capture --directory . --output-file coverage.info + lcov --remove coverage.info '/usr/*' --output-file coverage.info --ignore-errors unused + lcov --list coverage.info + +.PHONY: all clean debug release asan test test-png gdb bench coverage
\ No newline at end of file |
