From 1710acd18a4630ef704c66bf0cdae76dd658776a Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 18 Jan 2018 13:17:28 -0600 Subject: 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 Closes: #242 Approved by: mheon --- .papr.sh | 14 +++++++++++--- 1 file 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 -- cgit v1.2.3-54-g00ecf