summaryrefslogtreecommitdiff
path: root/automated
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-04-13 12:36:27 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-04-13 09:23:59 +0000
commit6c0718c2a8b06603429b44df2380aca30aa82133 (patch)
treeb565dc68bd046d3e1606edffac3813f4a47c9d1a /automated
parentca17f6313983ca374249646985fcb34427372f36 (diff)
automated: linux: migrate pm-qa test
Change-Id: Ic23d1690d871b8cf292f1b3c22d49b19326c3f00 Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated')
-rwxr-xr-xautomated/linux/pm-qa/pm-qa.sh43
-rw-r--r--automated/linux/pm-qa/pm-qa.yaml39
2 files changed, 82 insertions, 0 deletions
diff --git a/automated/linux/pm-qa/pm-qa.sh b/automated/linux/pm-qa/pm-qa.sh
new file mode 100755
index 0000000..51b965c
--- /dev/null
+++ b/automated/linux/pm-qa/pm-qa.sh
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+
+# shellcheck disable=SC1091
+. ../../lib/sh-test-lib
+
+OUTPUT="$(pwd)/output"
+RESULT_FILE="${OUTPUT}/result.txt"
+SKIP_INSTALL="false"
+
+RELEASE="pm-qa-v0.5.2"
+TESTS="cpufreq cpuidle cpuhotplug thermal cputopology"
+
+usage() {
+ echo "usage: $0 [-r <release>] [-t <tests>] [-s <true|false>] 1>&2"
+ exit 1
+}
+
+while getopts ":r:t:s:" opt; do
+ case "${opt}" in
+ r) RELEASE="${OPTARG}" ;;
+ t) TESTS="${OPTARG}" ;;
+ s) SKIP_INSTALL="${OPTARG}" ;;
+ *) usage ;;
+ esac
+done
+
+! check_root && error_msg "Please run this script as root."
+install_deps "git build-essential linux-libc-dev" "${SKIP_INSTALL}"
+create_out_dir "${OUTPUT}"
+
+rm -rf pm-qa
+git clone https://git.linaro.org/power/pm-qa.git
+cd pm-qa
+git checkout -b "${RELEASE}" "${RELEASE}"
+make -C utils
+
+for test in ${TESTS}; do
+ logfile="${OUTPUT}/${test}.log"
+ make -C "${test}" check 2>&1 | tee "${logfile}"
+ grep -E "^[a-z0-9_]+: (pass|fail|skip)" "${logfile}" \
+ | sed 's/://g' \
+ | tee -a "${RESULT_FILE}"
+done
diff --git a/automated/linux/pm-qa/pm-qa.yaml b/automated/linux/pm-qa/pm-qa.yaml
new file mode 100644
index 0000000..1c7847c
--- /dev/null
+++ b/automated/linux/pm-qa/pm-qa.yaml
@@ -0,0 +1,39 @@
+metadata:
+ name: pm-qa
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Test power management (PM-QA). Currently, the test runs
+ cpufreq, cpuidle, cpuhotplug, thermal and cputopology by
+ default and individual test can be run by setting TESTS
+ parameter in test job definition too. Test case documentation
+ available in wiki: https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/PmQaSpecification"
+ maintainer:
+ - lisa.nguyen@linaro.org
+ - chase.qi@linaro.org
+ os:
+ - ubuntu
+ - debian
+ - openembedded
+ scope:
+ - functional
+ - performance
+ devices:
+ - panda
+ - panda-es
+ - arndale
+ - vexpress-a9
+ - vexpress-tc2
+ - beaglebone-black
+ - juno
+ - hi6220-hikey
+ - apq8016-sbc
+
+params:
+ RELEASE: "pm-qa-v0.5.2"
+ TESTS: "cpufreq cpuidle cpuhotplug thermal cputopology"
+ SKIP_INSTALL: "false"
+
+run:
+ steps:
+ - cd ./automated/linux/pm-qa/
+ - ./pm-qa.sh -r "${RELEASE}" -t "${TESTS}" -s "${SKIP_INSTALL}"
+ - ../../utils/send-to-lava.sh ./output/result.txt