rasibley / rpms / hwdata

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