|
Than Ngo |
b7bcaa |
#!/bin/bash
|
|
Than Ngo |
b7bcaa |
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
Than Ngo |
b7bcaa |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
Than Ngo |
b7bcaa |
#
|
|
Than Ngo |
b7bcaa |
# runtest.sh of /CoreOS/patch/Sanity/upstream-test-suite
|
|
Than Ngo |
b7bcaa |
# Description: Executes the upstream test suite comming with the package
|
|
Than Ngo |
b7bcaa |
# Author: Than Ngo <than@redhat.com>
|
|
Than Ngo |
b7bcaa |
#
|
|
Than Ngo |
b7bcaa |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
Than Ngo |
b7bcaa |
#
|
|
Than Ngo |
b7bcaa |
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
|
|
Than Ngo |
b7bcaa |
#
|
|
Than Ngo |
b7bcaa |
# This copyrighted material is made available to anyone wishing
|
|
Than Ngo |
b7bcaa |
# to use, modify, copy, or redistribute it subject to the terms
|
|
Than Ngo |
b7bcaa |
# and conditions of the GNU General Public License version 2.
|
|
Than Ngo |
b7bcaa |
#
|
|
Than Ngo |
b7bcaa |
# This program is distributed in the hope that it will be
|
|
Than Ngo |
b7bcaa |
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
Than Ngo |
b7bcaa |
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
Than Ngo |
b7bcaa |
# PURPOSE. See the GNU General Public License for more details.
|
|
Than Ngo |
b7bcaa |
#
|
|
Than Ngo |
b7bcaa |
# You should have received a copy of the GNU General Public
|
|
Than Ngo |
b7bcaa |
# License along with this program; if not, write to the Free
|
|
Than Ngo |
b7bcaa |
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
Than Ngo |
b7bcaa |
# Boston, MA 02110-1301, USA.
|
|
Than Ngo |
b7bcaa |
#
|
|
Than Ngo |
b7bcaa |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
Than Ngo |
b7bcaa |
|
|
Than Ngo |
b7bcaa |
# Include rhts environment
|
|
Than Ngo |
b7bcaa |
. /usr/bin/rhts-environment.sh || exit 1
|
|
Than Ngo |
b7bcaa |
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
Than Ngo |
b7bcaa |
|
|
Than Ngo |
b7bcaa |
PACKAGE="doxygen"
|
|
Than Ngo |
b7bcaa |
|
|
Than Ngo |
b7bcaa |
rlJournalStart
|
|
Than Ngo |
b7bcaa |
rlPhaseStartSetup
|
|
Than Ngo |
b7bcaa |
rlAssertRpm $PACKAGE
|
|
Than Ngo |
b7bcaa |
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
|
Than Ngo |
b7bcaa |
rlRun "cp -a * $TmpDir" 0 "Copy files to $TmpDir"
|
|
Than Ngo |
b7bcaa |
rlRun "pushd $TmpDir"
|
|
Than Ngo |
b7bcaa |
rlPhaseEnd
|
|
Than Ngo |
b7bcaa |
|
|
Than Ngo |
b7bcaa |
rlPhaseStartTest "test --version"
|
|
Than Ngo |
b7bcaa |
rlRun "VERSION=\$( rpm -q --qf '%{VERSION}' doxygen )"
|
|
Than Ngo |
b7bcaa |
rlRun -s "doxygen --version"
|
|
Than Ngo |
b7bcaa |
rlAssertGrep "${VERSION}" $rlRun_LOG
|
|
Than Ngo |
b7bcaa |
rlPhaseEnd
|
|
Than Ngo |
b7bcaa |
|
|
Than Ngo |
b7bcaa |
rlPhaseStartTest "test upstream test suite"
|
|
Than Ngo |
b7bcaa |
rlRun "python3 runtests.py >out" 0 "python3 runtests.py"
|
|
Than Ngo |
b7bcaa |
rlRun "[ -s out ]" 0 "Output should not be empty"
|
|
Than Ngo |
b7bcaa |
rlRun "cat out" 0 "Output of the test suite"
|
|
Than Ngo |
b7bcaa |
rlAssertGrep 'All tests passed!' out
|
|
Than Ngo |
b7bcaa |
rlPhaseEnd
|
|
Than Ngo |
b7bcaa |
|
|
Than Ngo |
b7bcaa |
rlPhaseStartCleanup
|
|
Than Ngo |
b7bcaa |
rlRun "popd"
|
|
Than Ngo |
b7bcaa |
rlRun "rm -fr $TmpDir" 0 "Removing tmp directory"
|
|
Than Ngo |
b7bcaa |
rlPhaseEnd
|
|
Than Ngo |
b7bcaa |
rlJournalPrintText
|
|
Than Ngo |
b7bcaa |
rlJournalEnd
|