| 1 |
#!/bin/bash |
| 2 |
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k |
| 3 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 4 |
# |
| 5 |
# runtest.sh of /kernel/hwdata/idfiles/syntax |
| 6 |
# Description: checks for basic syntax errors |
| 7 |
# Author: Milos Malik <[email protected]> |
| 8 |
# |
| 9 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 |
# |
| 11 |
# Copyright (c) 2009 Red Hat, Inc. All rights reserved. |
| 12 |
# |
| 13 |
# This copyrighted material is made available to anyone wishing |
| 14 |
# to use, modify, copy, or redistribute it subject to the terms |
| 15 |
# and conditions of the GNU General Public License version 2. |
| 16 |
# |
| 17 |
# This program is distributed in the hope that it will be |
| 18 |
# useful, but WITHOUT ANY WARRANTY; without even the implied |
| 19 |
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 20 |
# PURPOSE. See the GNU General Public License for more details. |
| 21 |
# |
| 22 |
# You should have received a copy of the GNU General Public |
| 23 |
# License along with this program; if not, write to the Free |
| 24 |
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 25 |
# Boston, MA 02110-1301, USA. |
| 26 |
# |
| 27 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 28 |
|
| 29 |
# Include rhts environment |
| 30 |
. /usr/share/beakerlib/beakerlib.sh || exit 1 |
| 31 |
|
| 32 |
PACKAGE="hwdata" |
| 33 |
|
| 34 |
rlJournalStart |
| 35 |
rlPhaseStartSetup |
| 36 |
rlAssertRpm ${PACKAGE} |
| 37 |
rlAssertRpm pciutils |
| 38 |
rlAssertRpm usbutils |
| 39 |
OUTPUT_FILE=`mktemp` |
| 40 |
rlPhaseEnd |
| 41 |
|
| 42 |
rlPhaseStartTest |
| 43 |
rlRun "lspci >& ${OUTPUT_FILE}" |
| 44 |
rlRun "grep -i 'unknown line' ${OUTPUT_FILE}" 1 |
| 45 |
rlRun "lsusb >& ${OUTPUT_FILE}" 0,1 |
| 46 |
rlRun "grep -i 'unknown line' ${OUTPUT_FILE}" 1 |
| 47 |
rlPhaseEnd |
| 48 |
|
| 49 |
rlPhaseStartCleanup |
| 50 |
rm -f ${OUTPUT_FILE} |
| 51 |
rlPhaseEnd |
| 52 |
rlJournalPrintText |
| 53 |
rlJournalEnd |
| 54 |
|