summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-01-18 13:17:28 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2018-01-19 14:56:30 +0000
commit1710acd18a4630ef704c66bf0cdae76dd658776a (patch)
tree30f3f107ed56e946543326080aa20f48fe22bcc6
parent8657d70e725d5a94ac37df4fc48f94edccb546b0 (diff)
downloadpodman-1710acd18a4630ef704c66bf0cdae76dd658776a.tar.gz
podman-1710acd18a4630ef704c66bf0cdae76dd658776a.tar.bz2
podman-1710acd18a4630ef704c66bf0cdae76dd658776a.zip
Set NOTEST variable to skip tests in papr
The papr test with ansible is really handy for setting up test nodes. However, most of the time you want to run the tests manually, specifically the integration tests. Passing NOTEST=1 will allow you to skip gofmt, lint, and friends and will exit before the integration tests. Signed-off-by: baude <bbaude@redhat.com> Closes: #242 Approved by: mheon
-rwxr-xr-x.papr.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/.papr.sh b/.papr.sh
index a7aa119ce..dd638e002 100755
--- a/.papr.sh
+++ b/.papr.sh
@@ -4,6 +4,7 @@ set -xeuo pipefail
DIST=$(cat /etc/redhat-release | awk '{print $1}')
IMAGE=registry.fedoraproject.org/fedora:27
PACKAGER=dnf
+NOTEST=${NOTEST:-0}
if [[ ${DIST} != "Fedora" ]]; then
PACKAGER=yum
IMAGE=registry.centos.org/centos/centos:7
@@ -44,7 +45,11 @@ if test -z "${INSIDE_CONTAINER:-}"; then
--workdir /go/src/github.com/projectatomic/libpod \
-e INSIDE_CONTAINER=1 \
-e PYTHON=$PYTHON \
+ -e NOTEST=$NOTEST \
${IMAGE} /go/src/github.com/projectatomic/libpod/.papr.sh
+ if [[ "${NOTEST}" -eq 1 ]]; then
+ exit
+ fi
systemd-detect-virt
script -qefc ./test/test_runner.sh
exit 0
@@ -82,13 +87,16 @@ ${PACKAGER} install -y \
export GITVALIDATE_TIP=$(cd $GOSRC; git log -2 --pretty='%H' | tail -n 1)
export TAGS="seccomp $($GOSRC/hack/btrfs_tag.sh) $($GOSRC/hack/libdm_tag.sh) $($GOSRC/hack/btrfs_installed_tag.sh) $($GOSRC/hack/ostree_tag.sh) $($GOSRC/hack/selinux_tag.sh)"
-make gofmt TAGS="${TAGS}"
-make testunit TAGS="${TAGS}"
+if [[ "${NOTEST}" -eq 0 ]]; then
+ make gofmt TAGS="${TAGS}"
+ make testunit TAGS="${TAGS}"
+fi
+
make install.tools TAGS="${TAGS}"
# Only check lint and gitvalidation on more recent
# distros with updated git and tooling
-if [[ ${PACKAGER} != "yum" ]]; then
+if [[ ${PACKAGER} != "yum" ]] && [[ "${NOTEST}" -eq 0 ]]; then
HEAD=$GITVALIDATE_TIP make -C $GOSRC .gitvalidation TAGS="${TAGS}"
make lint
fi