From 9a8031b71908e6cdf4069ae884be91b13e7a4430 Mon Sep 17 00:00:00 2001 From: Lisa Nguyen Date: Tue, 26 May 2015 19:18:38 -0700 Subject: pm-qa: Move pm-qa files to Android directory The pm-qa.yaml test definition and pm-qa.sh script are used to run PM-QA on Android, but they are currently located in the commons folder. Move them to the Android folder to keep them organized. Change-Id: Ic694195c458f73b67091596f0b829a7dfb052230 Signed-off-by: Lisa Nguyen --- android/pm-qa.yaml | 11 ++++++++++ android/scripts/pm-qa.sh | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ common/pm-qa.yaml | 11 ---------- common/scripts/pm-qa.sh | 53 ------------------------------------------------ 4 files changed, 64 insertions(+), 64 deletions(-) create mode 100644 android/pm-qa.yaml create mode 100755 android/scripts/pm-qa.sh delete mode 100644 common/pm-qa.yaml delete mode 100755 common/scripts/pm-qa.sh diff --git a/android/pm-qa.yaml b/android/pm-qa.yaml new file mode 100644 index 0000000..7d5866e --- /dev/null +++ b/android/pm-qa.yaml @@ -0,0 +1,11 @@ +metadata: + format: "Lava-Test Test Definition 1.0" + name: pm-qa + description: "pm-qa tests." + +run: + steps: + - './android/scripts/pm-qa.sh' + +parse: + pattern: "^(?P[a-z0-9_]+):\\s+(?Ppass|fail|skip)" diff --git a/android/scripts/pm-qa.sh b/android/scripts/pm-qa.sh new file mode 100755 index 0000000..ed96a87 --- /dev/null +++ b/android/scripts/pm-qa.sh @@ -0,0 +1,53 @@ +#!/system/bin/sh + +scripts_dir="/system/bin/pm-qa" +test_func(){ + if [ ! -d "${scripts_dir}" ]; then + echo "pm-qa=fail" + exit + fi + + bin_dir="/data/bin" + + if [ ! -d $bin_dir ]; then + mkdir $bin_dir + fi + + cd ${bin_dir} + + export PATH=${bin_dir}:$PATH + + cd "${scripts_dir}" + + pwd_dir=$PWD + echo $pwd + tests_dirs="cpuidle cpufreq cpuhotplug cputopology thermal" + + for dir in $tests_dirs; do + var=$dir'_sanity.sh' + subDir=${pwd_dir}/$dir + if [ -d $subDir ]; then + cd $subDir + else + continue + fi + + echo `pwd` + + /system/bin/sh $var + if [ $? -ne 1 ]; then + continue + fi + + for file in `find . -name "*.sh" | sort`; do + path=$file + echo $path + /system/bin/sh $path + done + cd .. + done + + echo "pm-qa=pass" +} + +test_func diff --git a/common/pm-qa.yaml b/common/pm-qa.yaml deleted file mode 100644 index be6d249..0000000 --- a/common/pm-qa.yaml +++ /dev/null @@ -1,11 +0,0 @@ -metadata: - format: "Lava-Test Test Definition 1.0" - name: pm-qa - description: "pm-qa tests." - -run: - steps: - - './common/scripts/pm-qa.sh' - -parse: - pattern: "^(?P[a-z0-9_]+):\\s+(?Ppass|fail|skip)" diff --git a/common/scripts/pm-qa.sh b/common/scripts/pm-qa.sh deleted file mode 100755 index ed96a87..0000000 --- a/common/scripts/pm-qa.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/system/bin/sh - -scripts_dir="/system/bin/pm-qa" -test_func(){ - if [ ! -d "${scripts_dir}" ]; then - echo "pm-qa=fail" - exit - fi - - bin_dir="/data/bin" - - if [ ! -d $bin_dir ]; then - mkdir $bin_dir - fi - - cd ${bin_dir} - - export PATH=${bin_dir}:$PATH - - cd "${scripts_dir}" - - pwd_dir=$PWD - echo $pwd - tests_dirs="cpuidle cpufreq cpuhotplug cputopology thermal" - - for dir in $tests_dirs; do - var=$dir'_sanity.sh' - subDir=${pwd_dir}/$dir - if [ -d $subDir ]; then - cd $subDir - else - continue - fi - - echo `pwd` - - /system/bin/sh $var - if [ $? -ne 1 ]; then - continue - fi - - for file in `find . -name "*.sh" | sort`; do - path=$file - echo $path - /system/bin/sh $path - done - cd .. - done - - echo "pm-qa=pass" -} - -test_func -- cgit v1.2.3