blob: ed96a876b5f6e3da1cf4ed526465ce75d294ab5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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
|