acpica-tools/tests/acpidump/runtest.sh
Al Stone 1e3222cefe Add a CI test to run acpidump
Signed-off-by: Al Stone <ahs3@redhat.com>
2019-07-02 15:00:39 -06:00

31 lines
434 B
Bash
Executable File

#!/bin/bash
#
# simple script to run acpidump and verify we got
# some output.
#
PWD=$(pwd)
BINDIR="/usr/bin"
# see if acpidump runs
rm -f /tmp/acpi.tables
$BINDIR/acpidump -o /tmp/acpi.tables 2>&1
RET=$?
if [ $RET -ne 0 ]
then
echo FAIL acpidump
exit $RET
fi
RET=2
sz=$(ls -s /tmp/acpi.tables | cut -d' ' -f1)
[[ $sz -gt 0 ]] && RET=0
if [ $RET -ne 0 ]
then
echo FAIL acpidump
exit $RET
fi
echo PASS acpidump
exit $RET