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