criu/test/rpc/Makefile
Ruslan Kuprieiev d1d4c018e0 test: rpc: run test as a non-root user
It is nice to have non-root user case covered with tests.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-01-27 16:08:14 +03:00

27 lines
498 B
Makefile

all: test-c rpc_pb2.py criu
.PHONY: all
run: all
mkdir -p build
chmod a+rwx build
sudo -g '#1000' -u '#1000' ./run.sh
criu:
cp ../../criu $@
chmod u+s $@
test-c: rpc.pb-c.o test.o
gcc $^ -o $@ -lprotobuf-c
test.o: test.c
gcc -c $< -I ./
rpc_pb2.py: rpc.proto
protoc --proto_path=. --python_out=. rpc.proto
rpc.pb-c.c: rpc.proto
protoc-c --proto_path=. --c_out=. rpc.proto
clean:
rm -rf build rpc.pb-c.o test.o test-c rpc.pb-c.c rpc.pb-c.h rpc_pb2.py rpc_pb2.pyc criu
.PHONY: clean