Blame SPECS/run-misc-tests.sh

Packit Service 842c24
#!/bin/bash
Packit Service 842c24
#
Packit Service 842c24
#       run the misc tests: we need to do this in a script since
Packit Service 842c24
#       some of these are expected to fail which would normally cause
Packit Service 842c24
#	the %check step to stop.  however, this is expected behavior.
Packit Service 842c24
#	we are running iasl precisely because we expect it to stop when
Packit Service 842c24
#	presented with faulty ASL.
Packit Service 842c24
#
Packit Service 842c24
#       this script assumes it is in the source 'tests' directory at
Packit Service 842c24
#       start.
Packit Service 842c24
#
Packit Service 842c24
Packit Service 842c24
set -x
Packit Service 842c24
Packit Service 842c24
BINDIR="$1"
Packit Service 842c24
VERSION="$2"
Packit Service 842c24
Packit Service 842c24
# create files to compare against
Packit Service 842c24
$BINDIR/iasl -h
Packit Service 842c24
Packit Service 842c24
sed -e "s/VVVVVVVV/$VERSION/" \
Packit Service 842c24
    ../badcode.asl.result > misc/badcode.asl.expected
Packit Service 842c24
sed -e "s/VVVVVVVV/$VERSION/" \
Packit Service 842c24
    ../grammar.asl.result > misc/grammar.asl.expected
Packit Service 842c24
sed -e "s/VVVVVVVV/$VERSION/" \
Packit Service 842c24
    ../converterSample.asl.result > misc/converterSample.asl.expected
Packit Service 842c24
Packit Service 842c24
cd misc
Packit Service 842c24
Packit Service 842c24
# see if badcode.asl failed as expected
Packit Service 842c24
# NB: the -f option is required so we can see all of the errors
Packit Service 842c24
$BINDIR/iasl -f badcode.asl 2>&1 | tee badcode.asl.actual
Packit Service 842c24
diff badcode.asl.actual badcode.asl.expected >/dev/null 2>&1
Packit Service 842c24
[ $? -eq 0 ] || exit 1
Packit Service 842c24
Packit Service 842c24
# see if grammar.asl failed as expected
Packit Service 842c24
# NB: the -f option is required so we can see all of the errors
Packit Service 842c24
$BINDIR/iasl -f -of grammar.asl 2>&1 | tee grammar.asl.actual
Packit Service 842c24
diff grammar.asl.actual grammar.asl.expected >/dev/null 2>&1
Packit Service 842c24
[ $? -eq 0 ] || exit 1
Packit Service 842c24
Packit Service 842c24
# see if converterSample.asl succeeded as expected
Packit Service 842c24
$BINDIR/iasl converterSample.asl 2>&1 | tee converterSample.asl.actual
Packit Service 842c24
diff converterSample.asl.actual converterSample.asl.expected >/dev/null 2>&1
Packit Service 842c24
[ $? -ne 0 ] && exit 1
Packit Service 842c24
Packit Service 842c24
exit 0