diff options
Diffstat (limited to 'tests/testsuite/runtest.sh')
-rw-r--r-- | tests/testsuite/runtest.sh | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/testsuite/runtest.sh b/tests/testsuite/runtest.sh new file mode 100644 index 0000000..827d8f4 --- /dev/null +++ b/tests/testsuite/runtest.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/libtool/Sanity/testsuite +# Description: runs testsuite +# Author: Michal Nowak <mnowak@redhat.com> +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2010 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include rhts environment +. /usr/bin/rhts-environment.sh +. /usr/lib/beakerlib/beakerlib.sh + +PACKAGE="libtool" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlRun "rlFetchSrcForInstalled ${PACKAGE}" + rlRun "yum-builddep --nogpgcheck -y libtool-*.src.rpm" + rlRun "rpm -ivh libtool-*src.rpm" + specfile="$(rpm --eval '%_specdir')/${PACKAGE}.spec" + rpmbuild -bc ${specfile} + builddir="$(rpm --eval '%_builddir')/${PACKAGE}-*" + pushd ${builddir} + rlPhaseEnd + + rlPhaseStartTest + rlRun "make check VERBOSE=yes" 0 "Run testsuite" + rlPhaseEnd + + rlPhaseStartCleanup + popd + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd |