diff options
author | esla <slacowr@gmail.com> | 2013-12-20 20:53:09 +0900 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2014-01-15 13:44:53 +0000 |
commit | 047fcfef133b446d35f9fa94c74bdf02ed8b6a39 (patch) | |
tree | 139e3e5c0a3a5ef9341d80b0cf1fe6885455731b /openembedded/scripts | |
parent | c7b8b0857d394f24ca25fd100db7ac648d1eaecb (diff) |
Add acpi-smoke-test
Change-Id: I77ffc9631b88668fc0284a1124ed4d5bd445b81c
Diffstat (limited to 'openembedded/scripts')
-rwxr-xr-x | openembedded/scripts/acpi-smoke-test.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/openembedded/scripts/acpi-smoke-test.sh b/openembedded/scripts/acpi-smoke-test.sh new file mode 100755 index 0000000..176c811 --- /dev/null +++ b/openembedded/scripts/acpi-smoke-test.sh @@ -0,0 +1,48 @@ +#! /bin/bash +# +# Test ACPI Support in UEFI on v7 and v8 +# +# Copyright (C) 2012, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# +DSDTPASS= +echo -n "Testing presence of /sys/firmware/acpi: " +if [ -d /sys/firmware/acpi ]; then + lava-test-case sys-firmware-acpi-present --result pass +else + lava-test-case sys-firmware-acpi-present --result fail +fi +echo -n "Testing presence of /sys/firmware/acpi/tables/DSDT: " +if [ -f /sys/firmware/acpi/tables/DSDT ]; then + lava-test-case sys-firmware-acpi-tables-DSDT --result pass + DSDTPASS=pass +else + lava-test-case sys-firmware-acpi-tables-DSDT --result 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 + lava-test-case can-decompile-DSDT --result pass + else + lava-test-case can-decompile-DSDT --result fail + fi + rm /tmp/DSDT /tmp/DSDT.dsl +else + lava-test-case can-decompile-DSDT --result skip +fi |