2016-12-05 15:18:43 +00:00
|
|
|
include /etc/os-release
|
|
|
|
|
|
|
|
PATCH_DIR?=${ID}-${VERSION_ID}
|
|
|
|
|
2016-12-05 14:49:03 +00:00
|
|
|
all:
|
|
|
|
$(error please specify local or remote)
|
|
|
|
|
|
|
|
local: slow
|
|
|
|
|
|
|
|
remote: remote_slow
|
|
|
|
|
|
|
|
slow: clean
|
2021-08-02 21:40:52 +00:00
|
|
|
./kpatch-test --kpatch-build-opts="$(KPATCH_BUILD_OPTS)" -d $(PATCH_DIR) $(PATCHES)
|
2016-12-05 14:49:03 +00:00
|
|
|
|
|
|
|
quick: clean
|
2021-08-02 21:40:52 +00:00
|
|
|
./kpatch-test --kpatch-build-opts="$(KPATCH_BUILD_OPTS)" -d $(PATCH_DIR) --quick $(PATCHES)
|
2016-12-05 14:49:03 +00:00
|
|
|
|
|
|
|
cached:
|
2021-08-02 21:40:52 +00:00
|
|
|
./kpatch-test --kpatch-build-opts="$(KPATCH_BUILD_OPTS)" -d $(PATCH_DIR) --cached $(PATCHES)
|
2016-12-05 14:49:03 +00:00
|
|
|
|
2020-01-22 08:03:46 +00:00
|
|
|
vagrant: vagrant-quick
|
2018-10-30 09:49:59 +00:00
|
|
|
|
|
|
|
vagrant-quick:
|
|
|
|
./test-vagrant
|
|
|
|
|
|
|
|
vagrant-slow:
|
|
|
|
./test-vagrant --slow
|
|
|
|
|
2016-12-05 14:49:03 +00:00
|
|
|
clean:
|
|
|
|
rm -f *.ko *.log COMBINED.patch
|
|
|
|
|
|
|
|
check_host:
|
|
|
|
ifndef SSH_HOST
|
|
|
|
$(error SSH_HOST is undefined)
|
|
|
|
endif
|
|
|
|
|
|
|
|
SSH_USER ?= root
|
|
|
|
|
|
|
|
remote_setup: check_host
|
|
|
|
ssh $(SSH_USER)@$(SSH_HOST) exit
|
|
|
|
ssh $(SSH_USER)@$(SSH_HOST) "ls kpatch-setup &> /dev/null" || \
|
|
|
|
(scp remote-setup $(SSH_USER)@$(SSH_HOST):kpatch-setup && \
|
|
|
|
ssh $(SSH_USER)@$(SSH_HOST) "./kpatch-setup")
|
|
|
|
|
|
|
|
remote_sync: remote_setup
|
|
|
|
ssh $(SSH_USER)@$(SSH_HOST) "rm -rf kpatch-test"
|
|
|
|
rsync -Cavz --include=core $(shell readlink -f ../../..) $(SSH_USER)@$(SSH_HOST):kpatch-test
|
|
|
|
ssh $(SSH_USER)@$(SSH_HOST) "cd kpatch-test/kpatch && make"
|
|
|
|
|
|
|
|
remote_slow: remote_sync
|
2016-12-05 15:18:43 +00:00
|
|
|
ssh $(SSH_USER)@$(SSH_HOST) "cd kpatch-test/kpatch/test/integration && make slow"
|