Skip to content

Commit

Permalink
* AQUILONAQD-955: JENKINS-PIPELINE-MIGRATION
Browse files Browse the repository at this point in the history
Added no-interactive option and pushing test results to file.
  • Loading branch information
Karthik Kamurthy authored and Karthik Kamurthy committed Sep 7, 2021
1 parent a5e59ef commit 784f82e
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tests/jenkinstest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

echo $(which python)

set -o pipefail
TESTDIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)"
BASEDIR="$(dirname "$(dirname "$TESTDIR")")"
Expand All @@ -34,7 +32,7 @@ done


# Massage unittest.conf
sed -e "s!^basedir =.*\$!basedir = /var/tmp/$USER/run!" \
sed -e "s!^basedir =.*\$!basedir = /var/tmp/$USER/run!" \
-e "s/^kncport =.*$/kncport = ${KNCPORT}/" \
-e "s/^openport =.*$/openport = ${OPENPORT}/" \
-e "s/^git_port =.*$/git_port = ${GITPORT}/" \
Expand All @@ -43,9 +41,8 @@ sed -e "s!^basedir =.*\$!basedir = /var/tmp/$USER/run!" \


# Make sure UNITTEST_FAILURE is returned if tests fail otherwise jenkins does not mark build as failed
$TESTDIR/runtests.py --config $BASEDIR/unittest.conf --coverage | tee $TESTDIR/aqdtests.log
# $TESTDIR/runtests.py --config $BASEDIR/unittest.conf --coverage 2>&1 --no-interactive | tee $TESTDIR/aqdtests.log
# if [ $(grep -c '^OK$' $TESTDIR/aqdtests.log 2>/dev/null) -ne 2 ]; then
# echo UNITTEST_FAILURE
# exit 1
# fi
$TESTDIR/runtests.py --config $BASEDIR/unittest.conf --coverage 2>&1 --no-interactive | tee $TESTDIR/aqdtests.log
if [ $(grep -c '^OK$' $TESTDIR/aqdtests.log 2>/dev/null) -ne 2 ]; then
echo UNITTEST_FAILURE
exit 1
fi

0 comments on commit 784f82e

Please sign in to comment.