882bd4d
#!/bin/bash
882bd4d
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
882bd4d
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
882bd4d
#
882bd4d
#   runtest.sh of /CoreOS/acpica-tools/acpica-tools-tests/misc
882bd4d
#   Description: sanity tests for iasl(1) to confirm it fails gracefully when given bad AML code to compile
882bd4d
#   Author: Mike Gahagan <mgahagan@redhat.com>
882bd4d
#
882bd4d
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
882bd4d
#
882bd4d
#   Copyright (c) 2015 Red Hat, Inc.
882bd4d
#
882bd4d
#   This copyrighted material is made available to anyone wishing
882bd4d
#   to use, modify, copy, or redistribute it subject to the terms
882bd4d
#   and conditions of the GNU General Public License version 2.
882bd4d
#
882bd4d
#   This program is distributed in the hope that it will be
882bd4d
#   useful, but WITHOUT ANY WARRANTY; without even the implied
882bd4d
#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
882bd4d
#   PURPOSE. See the GNU General Public License for more details.
882bd4d
#
882bd4d
#   You should have received a copy of the GNU General Public
882bd4d
#   License along with this program; if not, write to the Free
882bd4d
#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
882bd4d
#   Boston, MA 02110-1301, USA.
882bd4d
#
882bd4d
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
882bd4d
882bd4d
# Include Beaker environment
882bd4d
#. /usr/bin/rhts-environment.sh
882bd4d
#. /usr/share/beakerlib/beakerlib.sh
882bd4d
TESTNAME=$(basename $TEST)
882bd4d
. ../include/include.sh
882bd4d
882bd4d
882bd4d
PACKAGE="acpica-tools"
882bd4d
882bd4d
rlJournalStart
882bd4d
    rlPhaseStartSetup
882bd4d
        rlAssertRpm $PACKAGE
882bd4d
        rlRun mk_test_dirs
882bd4d
        rlRun acpica-tools_prep
882bd4d
    rlPhaseEnd
882bd4d
882bd4d
    rlPhaseStartTest
882bd4d
        rlShowRunningKernel
882bd4d
        pushd ${RPMBUILDDIR}/BUILD/acpica-unix2-${RPM_VER}/tests
882bd4d
        rlRun "./run-misc-tests.sh /usr/bin $RPM_VER > $log_dir/run-misc-tests.sh.out 2>&1" 0 "Running ${RPMBUILDDIR}/BUILD/acpica-unix2-${RPM_VER}/tests/run-misc-tests.sh...."
882bd4d
        retval=$?
882bd4d
        if [[ $retval -ne 0 || $DeBug -ne 0 ]] ; then
882bd4d
          cp misc/badcode misc/badcode.asl.result misc/grammar misc/grammar.asl.result $log_dir
882bd4d
          diff $log_dir/badcode $log_dir/badcode.asl.result > $log_dir/badcode.diff
882bd4d
          diff $log_dir/grammar $log_dir/grammar.asl.result > $log_dir/grammar.diff
882bd4d
        fi
882bd4d
        popd
882bd4d
    rlPhaseEnd
882bd4d
882bd4d
    rlPhaseStartCleanup
882bd4d
      submit_logs
882bd4d
    rlPhaseEnd
882bd4d
rlJournalPrintText
882bd4d
rlJournalEnd