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 | |
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
-rw-r--r-- | ubuntu/acpi-smoke-test.yaml | 22 | ||||
-rwxr-xr-x | ubuntu/scripts/acpi-check.sh | 33 |
2 files changed, 55 insertions, 0 deletions
diff --git a/ubuntu/acpi-smoke-test.yaml b/ubuntu/acpi-smoke-test.yaml new file mode 100644 index 0000000..567a540 --- /dev/null +++ b/ubuntu/acpi-smoke-test.yaml @@ -0,0 +1,22 @@ +metadata: + name: acpi-smoke-test + format: "Lava-Test-Shell Test Definition 1.0" + description: + "ACPI smoke test, + 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" + maintainer: + - arthur.she@linaro.org + os: + - ubuntu + devices: + - rtsm_fvp_base-aemv8a + scope: + - functional + +run: + steps: + - 'sudo ./ubuntu/scripts/acpi-check.sh' +parse: + pattern: "(?P<test_case_id>[ /a-zA-Z0-9]+): (?P<result>[A-Z]+)" 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 + |