Add kpatch-unit-objs submodule

Add a submodule containing object files for unittests.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
Artem Savkov 2018-04-26 15:24:40 +02:00
parent 89a8ac740c
commit ffc4122efb
4 changed files with 14 additions and 13 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "test/unit/objs"]
path = test/unit/objs
url = https://github.com/dynup/kpatch-unit-test-objs.git

View File

@ -1,7 +1,11 @@
ARCH=$(shell uname -m) ARCH = $(shell uname -m)
OBJDIR ?= objs/$(ARCH)
all: Makefile.include $(ARCH)/Makefile .PHONY: all clean
$(MAKE) -C $(ARCH)
clean: Makefile.include $(ARCH)/Makefile all: Makefile.include
$(MAKE) -C $(ARCH) clean git submodule update --init --rebase
$(MAKE) -C $(OBJDIR)
clean: Makefile.include
$(MAKE) -C $(OBJDIR) clean

View File

@ -12,7 +12,7 @@ MUTE_FAIL := >/dev/null 2>&1
.SILENT: $(TARGETS) $(TEST_TARGETS) .SILENT: $(TARGETS) $(TEST_TARGETS)
endif endif
SRC_PATH ?= $(realpath ../../../) SRC_PATH ?= $(realpath ../../../../)
CDO ?= $(SRC_PATH)/kpatch-build/create-diff-object CDO ?= $(SRC_PATH)/kpatch-build/create-diff-object
TEST_LIBRARY ?= $(SRC_PATH)/test/test-functions.sh TEST_LIBRARY ?= $(SRC_PATH)/test/test-functions.sh
@ -22,12 +22,6 @@ TEST_ENV = KPATCH_TEST_LIBRARY=$(TEST_LIBRARY)
TARGETS = $(patsubst %.$(EXT_ORIG),%.$(EXT_OUTPUT),$(wildcard *.$(EXT_ORIG))) TARGETS = $(patsubst %.$(EXT_ORIG),%.$(EXT_OUTPUT),$(wildcard *.$(EXT_ORIG)))
TEST_TARGETS = $(patsubst %.$(EXT_TEST),%.$(EXT_TEST_OUTPUT),$(wildcard *.$(EXT_TEST))) TEST_TARGETS = $(patsubst %.$(EXT_TEST),%.$(EXT_TEST_OUTPUT),$(wildcard *.$(EXT_TEST)))
define check_lfs =
$(if $(shell head -1 $(1) | grep git-lfs.github.com),
$(error $(1) is not fetched. Unittests require https://git-lfs.github.com/),
)
endef
define check_stripped = define check_stripped =
$(if $(shell readelf --debug-dump $(1)), $(if $(shell readelf --debug-dump $(1)),
$(error $(1) is not properly stripped, use 'strip --strip-debug --keep-file-symbols $(1)' to fix this), $(error $(1) is not properly stripped, use 'strip --strip-debug --keep-file-symbols $(1)' to fix this),
@ -35,7 +29,6 @@ define check_stripped =
endef endef
define check_all = define check_all =
$(call check_lfs,$(1))
$(call check_stripped,$(1)) $(call check_stripped,$(1))
endef endef

1
test/unit/objs Submodule

@ -0,0 +1 @@
Subproject commit 5e9ba838509a38817bf394fdbb43b4f1ce5a9229