diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-07-28 14:48:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-28 14:48:28 +0200 |
commit | 6c5966cf3cbfa15602ba2d9ef57284f2669a321d (patch) | |
tree | 452db7496ba00a2e0da6ff4fce77b27a93fa7c12 /vendor/github.com/checkpoint-restore/go-criu/v5/Makefile | |
parent | a5de8314188d7376f645d8ac6c6f7a6f685b6a45 (diff) | |
parent | 60b9e8c0da683d253f3828f00442fc5a75540368 (diff) | |
download | podman-6c5966cf3cbfa15602ba2d9ef57284f2669a321d.tar.gz podman-6c5966cf3cbfa15602ba2d9ef57284f2669a321d.tar.bz2 podman-6c5966cf3cbfa15602ba2d9ef57284f2669a321d.zip |
Merge pull request #10910 from adrianreber/2021-07-12-checkpoint-restore-into-pod
Add support for checkpoint/restore into and out of pods
Diffstat (limited to 'vendor/github.com/checkpoint-restore/go-criu/v5/Makefile')
-rw-r--r-- | vendor/github.com/checkpoint-restore/go-criu/v5/Makefile | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/vendor/github.com/checkpoint-restore/go-criu/v5/Makefile b/vendor/github.com/checkpoint-restore/go-criu/v5/Makefile new file mode 100644 index 000000000..a5c5f5542 --- /dev/null +++ b/vendor/github.com/checkpoint-restore/go-criu/v5/Makefile @@ -0,0 +1,62 @@ +GO ?= go +CC ?= gcc + +all: build test phaul-test + +lint: + golangci-lint run ./... + +build: + $(GO) build -v ./... + +TEST_BINARIES := test/test test/piggie/piggie test/phaul/phaul +test-bin: $(TEST_BINARIES) + +test/piggie/piggie: test/piggie/piggie.c + $(CC) $^ -o $@ + +test/test: test/*.go + $(GO) build -v -o $@ $^ + +test: $(TEST_BINARIES) + mkdir -p image + PID=$$(test/piggie/piggie) && { \ + test/test dump $$PID image && \ + test/test restore image; \ + pkill -9 piggie; \ + } + rm -rf image + +test/phaul/phaul: test/phaul/*.go + $(GO) build -v -o $@ $^ + +phaul-test: $(TEST_BINARIES) + rm -rf image + PID=$$(test/piggie/piggie) && { \ + test/phaul/phaul $$PID; \ + pkill -9 piggie; \ + } + +clean: + @rm -f $(TEST_BINARIES) + @rm -rf image + @rm -f rpc/rpc.proto stats/stats.proto + +rpc/rpc.proto: + curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/rpc.proto -o $@ + +stats/stats.proto: + curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/stats.proto -o $@ + +rpc/rpc.pb.go: rpc/rpc.proto + protoc --go_out=. --go_opt=Mrpc/rpc.proto=rpc/ $^ + +stats/stats.pb.go: stats/stats.proto + protoc --go_out=. $^ + +vendor: + GO111MODULE=on $(GO) mod tidy + GO111MODULE=on $(GO) mod vendor + GO111MODULE=on $(GO) mod verify + +.PHONY: build test phaul-test test-bin clean lint vendor |