From 1c1795412e2824f65afc99a84c3634d4a4dc407a Mon Sep 17 00:00:00 2001 From: Andrew Vagin Date: Tue, 10 Nov 2015 16:36:00 +0300 Subject: [PATCH] jenkins: add script to create a test container We want to execute tests in an isolated environment Signed-off-by: Andrew Vagin Signed-off-by: Pavel Emelyanov --- test/jenkins/_run_ct | 7 +++++++ test/jenkins/run_ct | 3 +++ 2 files changed, 10 insertions(+) create mode 100755 test/jenkins/_run_ct create mode 100755 test/jenkins/run_ct diff --git a/test/jenkins/_run_ct b/test/jenkins/_run_ct new file mode 100755 index 000000000..98d880577 --- /dev/null +++ b/test/jenkins/_run_ct @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e +mount --make-rprivate / +umount -l /proc +mount -t proc proc /proc/ +exec "$@" diff --git a/test/jenkins/run_ct b/test/jenkins/run_ct new file mode 100755 index 000000000..5992b2ee5 --- /dev/null +++ b/test/jenkins/run_ct @@ -0,0 +1,3 @@ +#!/bin/sh + +unshare --mount --pid --fork -- $(readlink -f `dirname $0`/_run_ct) "$@"