From 6c0718c2a8b06603429b44df2380aca30aa82133 Mon Sep 17 00:00:00 2001 From: Chase Qi Date: Thu, 13 Apr 2017 12:36:27 +0800 Subject: automated: linux: migrate pm-qa test Change-Id: Ic23d1690d871b8cf292f1b3c22d49b19326c3f00 Signed-off-by: Chase Qi --- automated/linux/pm-qa/pm-qa.sh | 43 ++++++++++++++++++++++++++++++++++++++++ automated/linux/pm-qa/pm-qa.yaml | 39 ++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100755 automated/linux/pm-qa/pm-qa.sh create mode 100644 automated/linux/pm-qa/pm-qa.yaml (limited to 'automated') 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 ] [-t ] [-s ] 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 -- cgit v1.2.3