mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-23 21:47:52 +08:00
make(sharness): add plugins as part of sharness build
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
6
Rules.mk
6
Rules.mk
@ -27,6 +27,10 @@ export IPFS_REUSEPORT=false
|
||||
dir := bin
|
||||
include $(dir)/Rules.mk
|
||||
|
||||
# tests need access to rules from plugin
|
||||
dir := plugin
|
||||
include $(dir)/Rules.mk
|
||||
|
||||
dir := test
|
||||
include $(dir)/Rules.mk
|
||||
|
||||
@ -56,8 +60,6 @@ include $(dir)/Rules.mk
|
||||
dir := pin/internal/pb
|
||||
include $(dir)/Rules.mk
|
||||
|
||||
dir := plugin
|
||||
include $(dir)/Rules.mk
|
||||
|
||||
# -------------------- #
|
||||
# universal rules #
|
||||
|
@ -1,4 +1,5 @@
|
||||
# util functions
|
||||
OS ?= $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||
ifeq ($(OS),Windows_NT)
|
||||
WINDOWS :=1
|
||||
?exe :=.exe # windows compat
|
||||
|
1
test/sharness/.gitignore
vendored
1
test/sharness/.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
lib/sharness/
|
||||
test-results/
|
||||
trash directory.*.sh/
|
||||
plugins
|
||||
|
@ -1,6 +1,5 @@
|
||||
include mk/header.mk
|
||||
|
||||
|
||||
SHARNESS_$(d) = $(d)/lib/sharness/sharness.sh
|
||||
|
||||
T_$(d) = $(sort $(wildcard $(d)/t[0-9][0-9][0-9][0-9]-*.sh))
|
||||
@ -12,6 +11,20 @@ DEPS_$(d) += cmd/ipfs/ipfs
|
||||
DEPS_$(d) += $(d)/clean-test-results
|
||||
DEPS_$(d) += $(SHARNESS_$(d))
|
||||
|
||||
ifeq ($(OS),Linux)
|
||||
PLUGINS_DIR_$(d) := $(d)/plugins/
|
||||
ORGIN_PLUGINS_$(d) := $(plugin/plugins_plugins_so)
|
||||
PLUGINS_$(d) := $(addprefix $(PLUGINS_DIR_$(d)),$(notdir $(ORGIN_PLUGINS_$(d))))
|
||||
|
||||
$(PLUGINS_$(d)): $(ORGIN_PLUGINS_$(d))
|
||||
@mkdir -p $(@D)
|
||||
cp -f plugin/plugins/$(@F) $@
|
||||
|
||||
ifneq ($(TEST_NO_PLUGIN),1)
|
||||
DEPS_$(d) += $(PLUGINS_$(d))
|
||||
endif
|
||||
endif
|
||||
|
||||
export MAKE_SKIP_PATH=1
|
||||
|
||||
$(T_$(d)): $$(DEPS_$(d)) # use second expansion so coverage can inject dependency
|
||||
|
Reference in New Issue
Block a user