test/unit: update for cross-arch testing

Bump the submodule reference and modify the unit test Makefile to check
all supported architectures.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
This commit is contained in:
Joe Lawrence 2022-01-28 09:15:32 -05:00
parent 4c0e4898d9
commit f67a008478
2 changed files with 12 additions and 8 deletions

View File

@ -1,13 +1,17 @@
ARCH = $(shell uname -m)
OBJDIR ?= objs/$(ARCH)
ARCHES ?= ppc64le x86_64
.PHONY: all clean
.PHONY: all clean submodule-check
all: Makefile.include
all: $(addsuffix -test,$(ARCHES))
clean: $(addsuffix -clean,$(ARCHES))
submodule-check:
@cd $(shell git rev-parse --show-toplevel) && \
git diff-index --quiet HEAD test/unit/objs || \
echo -e "\nWARNING: unit tests are out of date - run \"git submodule update\"\n"
$(MAKE) -C $(OBJDIR)
clean: Makefile.include
if [ -d $(OBJDIR) ]; then $(MAKE) -C $(OBJDIR) clean; fi
%-test: Makefile.include submodule-check
$(MAKE) -C objs/$*
%-clean: Makefile.include
if [ -d objs/$* ]; then $(MAKE) -C objs/$* clean; fi

@ -1 +1 @@
Subproject commit 74e8f0f7fa45fa88494273323569952b695da2e5
Subproject commit 91d0715fac88a3f5b785330f608e8960d41c0710