1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
GPRBUILD = gprbuild
GPRCLEAN = gprclean
.PHONY: all test force
all: test
RTS =
TARGET =
PROJECT_PATH_ARG =
ifeq ($(RTS),)
RTS = full
RTS_CONF =
else
RTS_CONF = --RTS=$(RTS)
endif
ifeq ($(TARGET),)
TARGET = native
TARGET_CONF =
else
TARGET_CONF = --target=$(TARGET)
endif
CONF_ARGS = $(TARGET_CONF) $(RTS_CONF)
ifeq ($(OS),Windows_NT)
ifeq ($(TARGET),native)
exeext=.exe
endif
endif
ifeq ($(findstring vxworks,$(TARGET)),vxworks)
exeext=.out
endif
RUN=
ifeq ($(TARGET),powerpc-elf)
RUN=./support/run-ppc-elf
endif
build:
$(PROJECT_PATH_ARG) $(GPRBUILD) -p -Paunit_tests $(CONF_ARGS) $(LARGS)
run: build
-$(RUN) ./exe/$(TARGET)-$(RTS)/aunit_harness$(exeext)
test: build
-$(RUN) ./exe/aunit_harness$(exeext) > test.out.full 2>&1
egrep "^Total|^Success|^Fail|^Unexp" test.out.full > test.out
diff -b test.out expected.out
@echo
@echo "[OK] AUNIT TEST IS SUCCESSFUL"
clean:
$(RM) -rf obj exe support/obj support/lib *.cgpr test.out
RMDIR = rmdir
MKDIR = mkdir -p
RM = rm
CP = cp -p
|