From 3b8e0a1f66dd78b4855a7ecd337cb70ee95d65cd Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Fri, 28 Jan 2022 09:15:32 -0500 Subject: [PATCH] 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 --- test/unit/Makefile | 18 +++++++++++------- test/unit/objs | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/test/unit/Makefile b/test/unit/Makefile index 2123e5931..fde1717dd 100644 --- a/test/unit/Makefile +++ b/test/unit/Makefile @@ -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 diff --git a/test/unit/objs b/test/unit/objs index 74e8f0f7f..91d0715fa 160000 --- a/test/unit/objs +++ b/test/unit/objs @@ -1 +1 @@ -Subproject commit 74e8f0f7fa45fa88494273323569952b695da2e5 +Subproject commit 91d0715fac88a3f5b785330f608e8960d41c0710