#!/bin/bash # # simple script to run ASLTS # PWD=$(pwd) BINDIR="/usr/bin" # figure out the release being used release=$(ls acpitests-unix-*.tar.gz | cut -d- -f3 | cut -d. -f1) tarball="acpitests-unix-${release}.tar.gz" testdir="acpitests-unix-${release}" # environmental setup unset ASL unset acpiexec unset ASLTSDIR export ASL=$BINDIR/iasl export acpiexec=$BINDIR/acpiexec export acpibin=$BINDIR/acpibin export ASLTSDIR=$PWD/$testdir/tests/aslts export PATH=$ASLTSDIR/bin:$PATH TEST_MODES="n32 n64 o32 o64" TEST_CASES= # unpack the test suite rm -rf $testdir tar xzf $tarball # set up test suite environment . $ASLTSDIR/bin/common . $ASLTSDIR/bin/settings RESET_SETTINGS INIT_ALL_AVAILABLE_CASES INIT_ALL_AVAILABLE_MODES INIT_LOG_RESULTS # compile the test cases pushd $testdir/tests Do 0 $TEST_MODES $TEST_CASES if [ $? -ne 0 ]; then echo "ASLTS Compile Failure" echo FAIL aslts exit 1 fi popd # execute the test cases pushd $testdir/tests echo "" echo "ASL Test Suite Started: `date`" start_time=$(date) Do 1 $TEST_MODES $TEST_CASES RET=$? echo "" echo "ASL Test Suite Finished: `date`" echo " Started: $start_time" popd if [ $RET -eq 0 ] then echo PASS aslts else echo FAIL aslts fi exit $RET