rasibley / rpms / hwdata

Forked from rpms/hwdata a year ago
Clone
5729a0
#!/bin/bash
5729a0
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
5729a0
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5729a0
#
5729a0
#   runtest.sh of /kernel/hwdata/idfiles/syntax
5729a0
#   Description: checks for basic syntax errors
5729a0
#   Author: Milos Malik <mmalik@redhat.com>
5729a0
#
5729a0
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5729a0
#
5729a0
#   Copyright (c) 2009 Red Hat, Inc. All rights reserved.
5729a0
#
5729a0
#   This copyrighted material is made available to anyone wishing
5729a0
#   to use, modify, copy, or redistribute it subject to the terms
5729a0
#   and conditions of the GNU General Public License version 2.
5729a0
#
5729a0
#   This program is distributed in the hope that it will be
5729a0
#   useful, but WITHOUT ANY WARRANTY; without even the implied
5729a0
#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
5729a0
#   PURPOSE. See the GNU General Public License for more details.
5729a0
#
5729a0
#   You should have received a copy of the GNU General Public
5729a0
#   License along with this program; if not, write to the Free
5729a0
#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
5729a0
#   Boston, MA 02110-1301, USA.
5729a0
#
5729a0
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5729a0
5729a0
# Include rhts environment
5729a0
. /usr/bin/rhts-environment.sh
5729a0
. /usr/lib/beakerlib/beakerlib.sh
5729a0
5729a0
PACKAGE="hwdata"
5729a0
5729a0
rlJournalStart
5729a0
    rlPhaseStartSetup
5729a0
        rlAssertRpm ${PACKAGE}
5729a0
        rlAssertRpm pciutils
5729a0
        rlAssertRpm usbutils
5729a0
        OUTPUT_FILE=`mktemp`
5729a0
    rlPhaseEnd
5729a0
5729a0
    rlPhaseStartTest
5729a0
        rlRun "lspci >& ${OUTPUT_FILE}"
5729a0
        rlRun "grep -i 'unknown line' ${OUTPUT_FILE}" 1
5729a0
        rlRun "lsusb >& ${OUTPUT_FILE}" 0,1
5729a0
        rlRun "grep -i 'unknown line' ${OUTPUT_FILE}" 1
5729a0
    rlPhaseEnd
5729a0
5729a0
    rlPhaseStartCleanup
5729a0
        rm -f ${OUTPUT_FILE}
5729a0
    rlPhaseEnd
5729a0
rlJournalPrintText
5729a0
rlJournalEnd
5729a0