diff options
author | Arthur She <arthur.she@linaro.org> | 2014-06-09 22:41:54 -0700 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2014-06-24 16:58:19 +0000 |
commit | 1cf71f92d6bf342634b5a838bee1a01f8edaa999 (patch) | |
tree | 156879dace08997acf8133030e9b519f1116cd03 /ubuntu/scripts | |
parent | 6f9e2593555ec756d9b9e9c2c9a3e578dd452606 (diff) |
ACPI: add acpi-smoke-test.yaml
Do the following tests to check if the test image is ACPI supported
1) Check presence of /sys/firmware/acpi
2) Check presence of /sys/firmware/acpi/tables/DSDT
3) If iasl is installed test decompile of /sys/firmware/acpi/tables/DSDT
Change-Id: I3aaac732aaf4b8b8f5d5cbafc92e1e54fa35d3b6
Diffstat (limited to 'ubuntu/scripts')
-rwxr-xr-x | ubuntu/scripts/acpi-check.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ubuntu/scripts/acpi-check.sh b/ubuntu/scripts/acpi-check.sh new file mode 100755 index 0000000..467d773 --- /dev/null +++ b/ubuntu/scripts/acpi-check.sh @@ -0,0 +1,33 @@ +#! /bin/sh + +DSDTPASS= + +echo -n "Testing presence of /sys/firmware/acpi: " +if [ -d /sys/firmware/acpi ]; then + echo PASS +else + echo FAIL +fi + +echo -n "Testing presence of /sys/firmware/acpi/tables/DSDT: " +if [ -f /sys/firmware/acpi/tables/DSDT ]; then + echo PASS + DSDTPASS=pass +else + echo FAIL +fi + +echo -n "Can decompile DSDT: " +if [ -x /usr/bin/iasl -a -n "$DSDTPASS" ]; then + cp /sys/firmware/acpi/tables/DSDT /tmp/ + ERROR=`/usr/bin/iasl -d /tmp/DSDT 2>&1 | grep DSDT.dsl` + if [ -n "$ERROR" ]; then + echo PASS + else + echo FAIL + fi + rm /tmp/DSDT /tmp/DSDT.dsl +else + echo SKIP +fi + |