aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2010-07-06 17:18:05 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2010-07-06 17:18:05 +0000
commit6d31afa8e3ab79bfa6c97c341af73f4fc093351a (patch)
tree514e3ade7be23ac83127870abf009b5e5ae1d36f /tests
parentf2bf96d30fe08965ffd53a28099131ac030e43d5 (diff)
downloadsrc-6d31afa8e3ab79bfa6c97c341af73f4fc093351a.tar.gz
src-6d31afa8e3ab79bfa6c97c341af73f4fc093351a.zip
Import ACPICA 20100702.vendor/acpica/20100702
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=209734 svn path=/vendor-sys/acpica/20100702/; revision=209735; tag=vendor/acpica/20100702
Diffstat (limited to 'tests')
-rw-r--r--tests/templates/Makefile9
-rwxr-xr-xtests/templates/templates.sh50
2 files changed, 59 insertions, 0 deletions
diff --git a/tests/templates/Makefile b/tests/templates/Makefile
new file mode 100644
index 000000000000..1880dcc04184
--- /dev/null
+++ b/tests/templates/Makefile
@@ -0,0 +1,9 @@
+
+PROG= templates
+
+templates :
+ sh templates.sh
+
+clean :
+ rm -f *.asl *.aml *.dsl *.hex diff.log
+
diff --git a/tests/templates/templates.sh b/tests/templates/templates.sh
new file mode 100755
index 000000000000..06c08143df42
--- /dev/null
+++ b/tests/templates/templates.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+rm -f *.aml *.asl *.dsl *.log
+
+files=`ls`
+
+if [ "$1" == 1 ]; then
+ ASL_COMPILER="../../generate/unix/bin/iasl"
+else
+ ASL_COMPILER="iasl"
+fi
+
+echo "Using $ASL_COMPILER"
+
+#
+# Create and compile the terse (normal) templates just
+# to ensure that they will emit and compile
+#
+$ASL_COMPILER -T ALL > /dev/null 2>&1
+$ASL_COMPILER *.asl > /dev/null 2>&1
+
+rm -f *.aml *.asl *.dsl *.log
+
+# Create the templates (use verbose mode)
+
+$ASL_COMPILER -vt -T ALL > /dev/null 2>&1
+
+# Compile the templates
+
+$ASL_COMPILER *.asl > /dev/null 2>&1
+
+# Disassemble the compiled templates
+
+$ASL_COMPILER -d *.aml > /dev/null 2>&1
+
+> diff.log
+
+#
+# Compare templates to compiled/disassembled templates
+#
+for f in $files ; do
+ if [ "$f" != "$0" ] && [ "$f" != "Makefile" ]; then
+ sig=`echo $f | awk -F. '{print $1}'`
+
+ # Ignore differences in the comment/header field
+
+ diff -pu -I" \*" $sig.asl $sig.dsl >> diff.log
+ fi
+done
+