From 05571a7a0419434705beeb79a98575e558bf0d75 Mon Sep 17 00:00:00 2001 From: clime Date: Jul 07 2016 13:36:16 +0000 Subject: [beaker-tests] differentiation of setting up native beaker env from rpm vs setting up from source tree (and latest commits, hence) --- diff --git a/beaker-tests/Regression/backend/setup.sh b/beaker-tests/Regression/backend/setup.sh index b8a7409..4f331aa 100755 --- a/beaker-tests/Regression/backend/setup.sh +++ b/beaker-tests/Regression/backend/setup.sh @@ -1,7 +1,16 @@ #!/bin/bash export SCRIPTPATH="$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -export COPRROOTDIR=$SCRIPTPATH/../../../ + +if [[ `pwd` =~ ^/mnt/testarea.*$ ]]; then + echo "Setting up native beaker environment." + git clone https://github.com/fedora-copr/copr.git copr + export COPRROOTDIR=$SCRIPTPATH/copr +else + echo "Setting up from source tree." + export COPRROOTDIR=$SCRIPTPATH/../../../ +fi + export LANG=en_US.utf8 # install files from 'files' diff --git a/beaker-tests/Regression/dist-git/setup.sh b/beaker-tests/Regression/dist-git/setup.sh index 0118457..01089d3 100755 --- a/beaker-tests/Regression/dist-git/setup.sh +++ b/beaker-tests/Regression/dist-git/setup.sh @@ -2,6 +2,15 @@ export SCRIPTPATH="$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +if [[ `pwd` =~ ^/mnt/testarea.*$ ]]; then + echo "Setting up native beaker environment." + git clone https://github.com/fedora-copr/copr.git copr + export COPRROOTDIR=$SCRIPTPATH/copr +else + echo "Setting up from source tree." + export COPRROOTDIR=$SCRIPTPATH/../../../ +fi + dnf -y copr enable @copr/copr if [[ ! $RELEASETEST ]]; then dnf -y copr enable @copr/copr-dev @@ -127,7 +136,7 @@ fi export LANG=en_US.UTF-8 # install copr-mocks from sources -cd $SCRIPTPATH/../../../mocks +cd $COPRROOTDIR/mocks dnf -y builddep copr-mocks.spec if [[ ! $RELEASETEST ]]; then tito build -i --test --rpm @@ -137,7 +146,7 @@ fi cd - # install copr-dist-git from sources -cd $SCRIPTPATH/../../../dist-git +cd $COPRROOTDIR/dist-git dnf -y builddep copr-dist-git.spec --allowerasing if [[ ! $RELEASETEST ]]; then tito build -i --test --rpm