Skip to content

Commit

Permalink
test/unit: update for cross-arch testing
Browse files Browse the repository at this point in the history
Bump the submodule reference and modify the unit test Makefile to check
all supported architectures.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
  • Loading branch information
joe-lawrence committed Feb 2, 2022
1 parent 66eb42e commit 3b8e0a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions test/unit/Makefile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test/unit/objs

0 comments on commit 3b8e0a1

Please sign in to comment.