aboutsummaryrefslogtreecommitdiff
path: root/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/pm_qa/pm-qa.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/pm_qa/pm-qa.sh')
-rwxr-xr-xbuild/lib.linux-x86_64-2.7/lava_android_test/test_definitions/pm_qa/pm-qa.sh63
1 files changed, 63 insertions, 0 deletions
diff --git a/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/pm_qa/pm-qa.sh b/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/pm_qa/pm-qa.sh
new file mode 100755
index 0000000..a570d8e
--- /dev/null
+++ b/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/pm_qa/pm-qa.sh
@@ -0,0 +1,63 @@
+#!/system/bin/sh
+
+scripts_dir=$1 && shift
+if [ -z "${scripts_dir}" ];then
+ scripts_dir="/data/benchmark/pm-qa"
+fi
+test_func(){
+ if [ ! -d "${scripts_dir}" ]; then
+ echo "pm_qa=fail"
+ exit
+ fi
+
+ mkdir /data/bin/
+ cd /data/bin
+
+ busybox ln -s -f /system/bin/busybox awk
+ busybox ln -s -f /system/bin/busybox basename
+ busybox ln -s -f /system/bin/busybox chmod
+ busybox ln -s -f /system/bin/busybox chown
+ busybox ln -s -f /system/bin/busybox cp
+ busybox ln -s -f /system/bin/busybox diff
+ busybox ln -s -f /system/bin/busybox find
+ busybox ln -s -f /system/bin/busybox grep
+ busybox ln -s -f /system/bin/busybox rm
+ busybox ln -s -f /system/bin/busybox seq
+ busybox ln -s -f /system/bin/busybox taskset
+ busybox ln -s -f /system/bin/busybox tee
+ busybox ln -s -f /system/bin/busybox printf
+ busybox ln -s -f /system/bin/busybox wc
+
+ busybox ln -s -f /system/bin/fake_command command
+ busybox ln -s -f /system/bin/fake_sudo sudo
+ busybox ln -s -f /system/bin/fake_udevadm udevadm
+
+ export PATH=/data/bin:$PATH
+
+ cd "${scripts_dir}"
+
+ pwd_dir=$PWD
+ echo $pwd
+ tests_dirs="cpuidle cpufreq cpuhotplug sched_mc suspend thermal utils"
+
+ for dir in $tests_dirs; do
+ subDir=${pwd_dir}/$dir
+ if [ -d $subDir ]; then
+ cd $subDir
+ else
+ continue
+ fi
+
+ echo `pwd`
+ for file in `find . -name "*.sh"`; do
+ path=$file
+ echo $path
+ /system/bin/sh $path
+ done
+ cd ..
+ done
+
+ echo "pm_qa=pass"
+}
+
+test_func