Skip to content

Commit f67a008

Browse files
committed
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>
1 parent 4c0e489 commit f67a008

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

test/unit/Makefile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
ARCH = $(shell uname -m)
2-
OBJDIR ?= objs/$(ARCH)
1+
ARCHES ?= ppc64le x86_64
32

4-
.PHONY: all clean
3+
.PHONY: all clean submodule-check
54

6-
all: Makefile.include
5+
all: $(addsuffix -test,$(ARCHES))
6+
clean: $(addsuffix -clean,$(ARCHES))
7+
8+
submodule-check:
79
@cd $(shell git rev-parse --show-toplevel) && \
810
git diff-index --quiet HEAD test/unit/objs || \
911
echo -e "\nWARNING: unit tests are out of date - run \"git submodule update\"\n"
10-
$(MAKE) -C $(OBJDIR)
1112

12-
clean: Makefile.include
13-
if [ -d $(OBJDIR) ]; then $(MAKE) -C $(OBJDIR) clean; fi
13+
%-test: Makefile.include submodule-check
14+
$(MAKE) -C objs/$*
15+
16+
%-clean: Makefile.include
17+
if [ -d objs/$* ]; then $(MAKE) -C objs/$* clean; fi

0 commit comments

Comments
 (0)