diff options
author | baude <bbaude@redhat.com> | 2017-11-03 14:37:22 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-11-17 02:07:18 +0000 |
commit | d2eda1a8648b7e6053627e48bf500f9671f0a6c2 (patch) | |
tree | 0b86ea7165ab02003b9e6fc480432774a72724a6 /test/helpers.bash | |
parent | bf8b9a37df2aeead009996875f58c59625110472 (diff) | |
download | podman-d2eda1a8648b7e6053627e48bf500f9671f0a6c2.tar.gz podman-d2eda1a8648b7e6053627e48bf500f9671f0a6c2.tar.bz2 podman-d2eda1a8648b7e6053627e48bf500f9671f0a6c2.zip |
Enhancements to papr tests
The PR contains several enhancements to our CI testing.
- enable lint testing on Fedora
- add Centos Atomic as test platform
- integration tests on run on the OS natively (uncontainerized)
- builds are done in containers
- inclusion of Vagrant file for local testing
Signed-off-by: baude <bbaude@redhat.com>
Closes: #18
Approved by: mheon
Diffstat (limited to 'test/helpers.bash')
-rw-r--r-- | test/helpers.bash | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/test/helpers.bash b/test/helpers.bash index dee2193d3..3ec247e60 100644 --- a/test/helpers.bash +++ b/test/helpers.bash @@ -7,13 +7,21 @@ INTEGRATION_ROOT=$(dirname "$(readlink -f "$BASH_SOURCE")") TESTDATA="${INTEGRATION_ROOT}/testdata" # Root directory of the repository. -CRIO_ROOT=${CRIO_ROOT:-$(cd "$INTEGRATION_ROOT/../.."; pwd -P)} +if [[ ! -z "$CRIO_ROOT" ]]; then + CRIO_ROOT=${CRIO_ROOT} +elif [[ ! -z "$TRAVIS" ]]; then + CRIO_ROOT="/go/src/github.com/projectatomic/libpod" +elif [[ ! -z "$PAPR" ]]; then + CRIO_ROOT="/var/tmp/checkout" +else + CRIO_ROOT=$(cd "$INTEGRATION_ROOT/../.."; pwd -P)} +fi -KPOD_BINARY=${KPOD_BINARY:-${CRIO_ROOT}/libpod/bin/kpod} +KPOD_BINARY=${KPOD_BINARY:-${CRIO_ROOT}/bin/kpod} # Path of the conmon binary. -CONMON_BINARY=${CONMON_BINARY:-${CRIO_ROOT}/libpod/bin/conmon} +CONMON_BINARY=${CONMON_BINARY:-${CRIO_ROOT}/bin/conmon} # Path of the default seccomp profile. -SECCOMP_PROFILE=${SECCOMP_PROFILE:-${CRIO_ROOT}/libpod/seccomp.json} +SECCOMP_PROFILE=${SECCOMP_PROFILE:-${CRIO_ROOT}/seccomp.json} # Name of the default apparmor profile. APPARMOR_PROFILE=${APPARMOR_PROFILE:-crio-default} # Runtime @@ -33,13 +41,13 @@ BOOT_CONFIG_FILE_PATH=${BOOT_CONFIG_FILE_PATH:-/boot/config-`uname -r`} # Path of apparmor parameters file. APPARMOR_PARAMETERS_FILE_PATH=${APPARMOR_PARAMETERS_FILE_PATH:-/sys/module/apparmor/parameters/enabled} # Path of the bin2img binary. -BIN2IMG_BINARY=${BIN2IMG_BINARY:-${CRIO_ROOT}/libpod/test/bin2img/bin2img} +BIN2IMG_BINARY=${BIN2IMG_BINARY:-${CRIO_ROOT}/test/bin2img/bin2img} # Path of the copyimg binary. -COPYIMG_BINARY=${COPYIMG_BINARY:-${CRIO_ROOT}/libpod/test/copyimg/copyimg} +COPYIMG_BINARY=${COPYIMG_BINARY:-${CRIO_ROOT}/test/copyimg/copyimg} # Path of tests artifacts. -ARTIFACTS_PATH=${ARTIFACTS_PATH:-${CRIO_ROOT}/libpod/.artifacts} +ARTIFACTS_PATH=${ARTIFACTS_PATH:-${CRIO_ROOT}/.artifacts} # Path of the checkseccomp binary. -CHECKSECCOMP_BINARY=${CHECKSECCOMP_BINARY:-${CRIO_ROOT}/libpod/test/checkseccomp/checkseccomp} +CHECKSECCOMP_BINARY=${CHECKSECCOMP_BINARY:-${CRIO_ROOT}/test/checkseccomp/checkseccomp} # XXX: This is hardcoded inside cri-o at the moment. DEFAULT_LOG_PATH=/var/log/crio/pods # Cgroup manager to be used @@ -51,7 +59,12 @@ PIDS_LIMIT=${PIDS_LIMIT:-1024} # Log size max limit LOG_SIZE_MAX_LIMIT=${LOG_SIZE_MAX_LIMIT:--1} -TESTDIR=$(mktemp -d) +if [[ ! -d "/test.dir" ]]; then + mkdir /test.dir +fi + +TESTDIR=$(mktemp -p /test.dir -d) +#mount -t tmpfs tmpfs ${TESTDIR} # kpod pull needs a configuration file for shortname pulls export REGISTRIES_CONFIG_PATH="$INTEGRATION_ROOT/registries.conf" |