Fixed a recompilation issue in CI, tweaked coverage.py a bit more

This was lost in the Travis -> GitHub transition, in serializing some of
the jobs, I missed that we need to clean between tests with different
geometry configurations. Otherwise we end up running outdated binaries,
which explains some of the weird test behavior we were seeing.

Also tweaked a few script things:
- Better subprocess error reporting (dump stderr on failure)
- Fixed a BUILDDIR rule issue in test.py
- Changed test-not-run status to None instead of undefined
This commit is contained in:
Christopher Haster
2021-01-03 15:38:48 -06:00
parent b84fb6bcc5
commit 9d6546071b
5 changed files with 124 additions and 86 deletions

View File

@@ -16,6 +16,7 @@ else
TARGET ?= $(BUILDDIR)lfs.a
endif
CC ?= gcc
AR ?= ar
SIZE ?= size
@@ -24,14 +25,9 @@ NM ?= nm
LCOV ?= lcov
SRC ?= $(wildcard *.c bd/*.c)
OBJ := $(SRC:%.c=%.o)
DEP := $(SRC:%.c=%.d)
ASM := $(SRC:%.c=%.s)
ifdef BUILDDIR
override OBJ := $(addprefix $(BUILDDIR),$(OBJ))
override DEP := $(addprefix $(BUILDDIR),$(DEP))
override ASM := $(addprefix $(BUILDDIR),$(ASM))
endif
OBJ := $(SRC:%.c=$(BUILDDIR)%.o)
DEP := $(SRC:%.c=$(BUILDDIR)%.d)
ASM := $(SRC:%.c=$(BUILDDIR)%.s)
ifdef DEBUG
override CFLAGS += -O0 -g3
@@ -81,10 +77,6 @@ tags:
code: $(OBJ)
./scripts/code.py $^ $(CODEFLAGS)
.PHONY: coverage
coverage:
./scripts/coverage.py $(BUILDDIR)tests/*.toml.info $(COVERAGEFLAGS)
.PHONY: test
test:
./scripts/test.py $(TESTFLAGS)
@@ -92,6 +84,10 @@ test:
test%: tests/test$$(firstword $$(subst \#, ,%)).toml
./scripts/test.py $@ $(TESTFLAGS)
.PHONY: coverage
coverage:
./scripts/coverage.py $(BUILDDIR)tests/*.toml.info $(COVERAGEFLAGS)
# rules
-include $(DEP)
.SUFFIXES: