File: Makefile

package info (click to toggle)
golang-github-checkpoint-restore-checkpointctl 1.3.0%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 628 kB
  • sloc: ansic: 208; makefile: 172; sh: 40
file content (26 lines) | stat: -rw-r--r-- 602 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
CRIU ?= criu
CC ?= gcc

all: test clean

test: test-imgs
	@echo "Running BATS tests..."
	bats checkpointctl.bats

test-junit: test-imgs
	@echo "Running BATS tests with JUnit results..."
	bats -F junit checkpointctl.bats > junit.xml

test-imgs: piggie/piggie
	$(eval PID := $(shell export TEST_ENV=BAR TEST_ENV_EMPTY=; piggie/piggie --tcp-socket))
	mkdir -p $@
	$(CRIU) dump --tcp-established -v4 -o dump.log -D $@ -t $(PID) || cat $@/dump.log

piggie/piggie: piggie/piggie.c
	$(CC) $^ -o $@

clean:
	@echo "Cleaning up test files..."
	@rm -rf test-imgs piggie/piggie

.PHONY: all test test-junit clean