Merge lp://staging/~kejun-zhou/lava-android-test/pm-qa into lp://staging/lava-android-test
- pm-qa
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 173 |
Proposed branch: | lp://staging/~kejun-zhou/lava-android-test/pm-qa |
Merge into: | lp://staging/lava-android-test |
Diff against target: |
126 lines (+107/-0) (has conflicts) 3 files modified
MANIFEST.in (+4/-0) lava_android_test/test_definitions/pm-qa.py (+47/-0) lava_android_test/test_definitions/pm-qa/pm-qa.sh (+56/-0) Text conflict in MANIFEST.in |
To merge this branch: | bzr merge lp://staging/~kejun-zhou/lava-android-test/pm-qa |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Yongqin Liu | Approve | ||
Zach Pfeffer | Pending | ||
Review via email: mp+108892@code.staging.launchpad.net |
This proposal supersedes a proposal from 2012-06-06.
Commit message
Description of the change
The LAVA test is used to make pm-qa test running.
pm-qa is a test suite with many test cases about power management.
Kejun ZHOU (kejun-zhou) wrote : | # |
24 busybox ln -s -f /system/bin/busybox wc
25
26 export PATH=/data/
27
* 28 cd /system/xbin/pm-qa*
29
30 pwd=$PWD
31 echo $pwd
32 tests_dirs="cpuidle cpufreq cpuhotplug sched_mc suspend thermal
utils"
33 files=`find cpuidle cpufreq cpuhotplug sched_mc suspend thermal
utils -name "*.sh"`
34
The line 28 is used to change the working DIR.
On 13 June 2012 17:26, Yongqin Liu <email address hidden> wrote:
> Review: Needs Fixing
>
> 92 + for tests_dirs in $tests_dirs
> the same variable name "tests_dirs" is used.
>
> 94 + subDir=
> 95 + if [ -d $subDir ]; then
> 96 + cd $subDir
> 97 + fi
> the pm-qa.sh will be run like this "adb shell /xxx/pm-qa.sh"
> and the pwd should be the home of root "/",
> if you do not do something before run pm-qa.sh,
> I don't think there will be "cpuidle cpufreq cpuhotplug sched_mc suspend
> thermal utils" directories under the root directory.
> --
>
> https:/
> You are the owner of lp:~kejun-zhou/lava-android-test/pm-qa.
>
Yongqin Liu (liuyq0307) wrote : | # |
> 24 busybox ln -s -f /system/bin/busybox wc
> 25
> 26 export PATH=/data/
> 27
> * 28 cd /system/xbin/pm-qa*
sorry, missed this line.
And some other things:
100 + for dir in `find . -name "*.sh"`
from the find command, we can see that the output should not be directories,
so use the variable name "dir" is not good I think.
104 + `echo $SHELL` $path
The $SHELL veriable seems not defined.
And about this shell script, What do it do?
What I see is:
1. if /system/xbin/pm-qa directory exists, output "pm-qa=pass", otherwise output "pm-qa=fail"
2. if /system/xbin/pm-qa directory exists, list the sh files in that directory.
Is that right?
Kejun ZHOU (kejun-zhou) wrote : | # |
On 13 June 2012 21:50, Yongqin Liu <email address hidden> wrote:
> > 24 busybox ln -s -f /system/bin/busybox wc
> > 25
> > 26 export PATH=/data/
> > 27
> > * 28 cd /system/xbin/pm-qa*
> sorry, missed this line.
>
> And some other things:
> 100 + for dir in `find . -name "*.sh"`
> from the find command, we can see that the output should not be
> directories,
> so use the variable name "dir" is not good I think.
I will update it.
>
> 104 + `echo $SHELL` $path
> The $SHELL veriable seems not defined.
>
$SHELL is defined. In Linaro Android system, it is /system/bin/sh.
> And about this shell script, What do it do?
> What I see is:
> 1. if /system/xbin/pm-qa directory exists, output "pm-qa=pass", otherwise
> output "pm-qa=fail"
> 2. if /system/xbin/pm-qa directory exists, list the sh files in that
> directory.
> Is that right?
If the pm-qa exists, the test will run all the *.sh.
> --
>
> https:/
> You are the owner of lp:~kejun-zhou/lava-android-test/pm-qa.
>
Kejun ZHOU (kejun-zhou) wrote : Posted in a previous version of this proposal | # |
Modify two parts at 15-Jun-2012
Yongqin Liu (liuyq0307) wrote : | # |
The $SHELL should have no value.
lava-android-test will not login to the shell to run the command.
lava-android-test just use "adb shell command" to run the script.
Below is the details about $SHELL.
17:24:25 liuyq:lava-
#!/system/bin/sh
echo $SHELL
17:24:42 liuyq:lava-
17:24:47 liuyq:lava-
root@linaro: /data/local/test.sh
/system/bin/sh
root@linaro: ^D
17:24:58 liuyq:lava-
93 + for tests_dirs in $tests_dirs
Also please make the two variable name different
And also please update this file:
lava-android-
Yongqin Liu (liuyq0307) wrote : | # |
8 +<<<<<<< TREE
9 include lava_android_
10 +=======
11 +include lava_android_
12 +>>>>>>> MERGE-SOURCE
There in conflict in the diff.
And because I don't have the image that pm-qa integrated, so I can't try it in my local.
could you show the output of "lava-android-test run pm-qa"
Kejun ZHOU (kejun-zhou) wrote : | # |
(pm-qa)
$ lava-android-test install pm-qa
LAVA: --Start Operation: Install test (pm-qa)
LAVA: Begin to execute command: adb push
/usr/local/
/data/lava-
LAVA: (stdout) 32 KB/s (1350 bytes in 0.040s)
LAVA: Begin to execute command: adb shell chmod 777
/data/lava-
LAVA: --End Operation: Install test (pm-qa)
(pm-qa)
$ lava-android-test run pm-qa
LAVA: --Start Operation: Run test (pm-qa)
LAVA: Begin to execute command: adb shell
/data/lava-
LAVA: (stdout) mkdir failed for /data/bin/, File exists
LAVA: (stdout) /system/xbin/pm-qa
LAVA: (stdout) find: cpufreq: No such file or directory
LAVA: (stdout) /system/
LAVA: (stdout) ./cpuidle_01.sh
LAVA: (stdout) cpuidle_01.0: checking 'current_driver' exists...
LAVA: (stdout) cpuidle_01.1: checking 'current_
pass
LAVA: (stdout) cpuidle_01.0/cpu0: checking 'desc' exists...
pass
LAVA: (stdout) cpuidle_01.1/cpu0: checking 'latency' exists...
LAVA: (stdout) cpuidle_01.2/cpu0: checking 'name' exists...
pass
LAVA: (stdout) cpuidle_01.3/cpu0: checking 'power' exists...
LAVA: (stdout) cpuidle_01.4/cpu0: checking 'time' exists...
pass
LAVA: (stdout) cpuidle_01.5/cpu0: checking 'usage' exists...
LAVA: (stdout) cpuidle_01.6/cpu0: checking 'desc' exists...
pass
LAVA: (stdout) cpuidle_01.7/cpu0: checking 'latency' exists...
LAVA: (stdout) cpuidle_01.8/cpu0: checking 'name' exists...
pass
LAVA: (stdout) cpuidle_01.9/cpu0: checking 'power' exists...
LAVA: (stdout) cpuidle_01.10/cpu0: checking 'time' exists...
LAVA: (stdout) cpuidle_01.11/cpu0: checking 'usage' exists...
pass
LAVA: (stdout) cpuidle_01.0/cpu1: checking 'desc' exists...
pass
LAVA: (stdout) cpuidle_01.1/cpu1: checking 'latency' exists...
LAVA: (stdout) cpuidle_01.2/cpu1: checking 'name' exists...
pass
LAVA: (stdout) cpuidle_01.3/cpu1: checking 'power' exists...
LAVA: (stdout) cpuidle_01.4/cpu1: checking 'time' exists...
pass
LAVA: (stdout) cpuidle_01.5/cpu1: checking 'usage' exists...
LAVA: (stdout) cpuidle_01.6/cpu1: checking 'desc' exists...
pass
LAVA: (stdout) cpuidle_01.7/cpu1: checking 'latency' exists...
LAVA: (stdout) cpuidle_01.8/cpu1: checking 'name' exists...
pass
LAVA: (stdout) cpuidle_01.9/cpu1: checking 'power' exists...
LAVA: (stdout) cpuidle_01.10/cpu1: checking 'time' exists...
LAVA: (stdout) cpuidle_01.11/cpu1: checking 'usage' exists...
pass
LAVA: (stdout) ./cpuidle_02.sh
LAVA: (stdout) ./cpuidle_
Yongqin Liu (liuyq0307) wrote : | # |
The tests seems not run correctly.
It does not output the pm-qa=fail or pm-qa=pass result.
Thanks,
Yongqin Liu
> (pm-qa)
> $ lava-android-test install pm-qa
> LAVA: --Start Operation: Install test (pm-qa)
> LAVA: Begin to execute command: adb push
> /usr/local/
> packages/
> /pm-qa/pm-qa.sh
> /data/lava-
> LAVA: (stdout) 32 KB/s (1350 bytes in 0.040s)
> LAVA: Begin to execute command: adb shell chmod 777
> /data/lava-
> LAVA: --End Operation: Install test (pm-qa)
> (pm-qa)
> $ lava-android-test run pm-qa
> LAVA: --Start Operation: Run test (pm-qa)
> LAVA: Begin to execute command: adb shell
> /data/lava-
> LAVA: (stdout) mkdir failed for /data/bin/, File exists
> LAVA: (stdout) /system/xbin/pm-qa
> LAVA: (stdout) find: cpufreq: No such file or directory
> LAVA: (stdout) /system/
> LAVA: (stdout) ./cpuidle_01.sh
> LAVA: (stdout) cpuidle_01.0: checking 'current_driver' exists...
> pass
> LAVA: (stdout) cpuidle_01.1: checking 'current_
> pass
> LAVA: (stdout) cpuidle_01.0/cpu0: checking 'desc' exists...
> pass
> LAVA: (stdout) cpuidle_01.1/cpu0: checking 'latency' exists...
> pass
> LAVA: (stdout) cpuidle_01.2/cpu0: checking 'name' exists...
> pass
> LAVA: (stdout) cpuidle_01.3/cpu0: checking 'power' exists...
> pass
> LAVA: (stdout) cpuidle_01.4/cpu0: checking 'time' exists...
> pass
> LAVA: (stdout) cpuidle_01.5/cpu0: checking 'usage' exists...
> pass
> LAVA: (stdout) cpuidle_01.6/cpu0: checking 'desc' exists...
> pass
> LAVA: (stdout) cpuidle_01.7/cpu0: checking 'latency' exists...
> pass
> LAVA: (stdout) cpuidle_01.8/cpu0: checking 'name' exists...
> pass
> LAVA: (stdout) cpuidle_01.9/cpu0: checking 'power' exists...
> pass
> LAVA: (stdout) cpuidle_01.10/cpu0: checking 'time' exists...
> pass
> LAVA: (stdout) cpuidle_01.11/cpu0: checking 'usage' exists...
> pass
> LAVA: (stdout) cpuidle_01.0/cpu1: checking 'desc' exists...
> pass
> LAVA: (stdout) cpuidle_01.1/cpu1: checking 'latency' exists...
> pass
> LAVA: (stdout) cpuidle_01.2/cpu1: checking 'name' exists...
> pass
> LAVA: (stdout) cpuidle_01.3/cpu1: checking 'power' exists...
> pass
> LAVA: (stdout) cpuidle_01.4/cpu1: checking 'time' exists...
> pass
> LAVA: (stdout) cpuidle_01.5/cpu1: checking 'usage' exists...
> pass
> LAVA: (stdout) cpuidle_01.6/cpu1: checking 'desc' exists...
> pass
> LAVA: (stdout) cpuidle_01.7/cpu1: checking 'latency' exists...
> pass
> LAVA: (stdout) cpuidle_01.8/cpu1: checking 'name' exists...
> pass
> LAVA: (stdout) cpuidle_01.9/cpu1: checking 'power' exists...
> ...
Kejun ZHOU (kejun-zhou) wrote : | # |
The test has many cases to run.
At this time some cases have been finished yet. And some cases need to be
fixed. Some cases is blocked.
The pm-qa LAVA test is just to launch the pm-qa original test cases.
On 18 June 2012 11:05, Yongqin Liu <email address hidden> wrote:
> The tests seems not run correctly.
> It does not output the pm-qa=fail or pm-qa=pass result.
>
>
> Thanks,
> Yongqin Liu
> > (pm-qa)
> > $ lava-android-test install pm-qa
> > LAVA: --Start Operation: Install test (pm-qa)
> > LAVA: Begin to execute command: adb push
> > /usr/local/
> >
> packages/
> > /pm-qa/pm-qa.sh
> > /data/lava-
> > LAVA: (stdout) 32 KB/s (1350 bytes in 0.040s)
> > LAVA: Begin to execute command: adb shell chmod 777
> > /data/lava-
> > LAVA: --End Operation: Install test (pm-qa)
> > (pm-qa)
> > $ lava-android-test run pm-qa
> > LAVA: --Start Operation: Run test (pm-qa)
> > LAVA: Begin to execute command: adb shell
> > /data/lava-
> > LAVA: (stdout) mkdir failed for /data/bin/, File exists
> > LAVA: (stdout) /system/xbin/pm-qa
> > LAVA: (stdout) find: cpufreq: No such file or directory
> > LAVA: (stdout) /system/
> > LAVA: (stdout) ./cpuidle_01.sh
> > LAVA: (stdout) cpuidle_01.0: checking 'current_driver' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.1: checking 'current_
> > pass
> > LAVA: (stdout) cpuidle_01.0/cpu0: checking 'desc' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.1/cpu0: checking 'latency' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.2/cpu0: checking 'name' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.3/cpu0: checking 'power' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.4/cpu0: checking 'time' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.5/cpu0: checking 'usage' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.6/cpu0: checking 'desc' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.7/cpu0: checking 'latency' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.8/cpu0: checking 'name' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.9/cpu0: checking 'power' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.10/cpu0: checking 'time' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.11/cpu0: checking 'usage' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.0/cpu1: checking 'desc' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.1/cpu1: checking 'latency' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.2/cpu1: checking 'name' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.3/cpu1: checking 'power' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.4/cpu1: checking 'time' exists...
> > pass
> > ...
Yongqin Liu (liuyq0307) wrote : | # |
OK, from the output above I did not see any issues.
You can use lava-android-test run pm-qa -o /tmp/pm-qa.json to verify the test result.
The the result in "test_results" is what you want.
Then it will be OK.
I will approve it now.
And if you have tested it, please let me know.
I will merge it then.
Thanks.
Yongqin Liu
92 + for tests_dirs in $tests_dirs
the same variable name "tests_dirs" is used.
94 + subDir= `pwd`/$ tests_dirs
95 + if [ -d $subDir ]; then
96 + cd $subDir
97 + fi
the pm-qa.sh will be run like this "adb shell /xxx/pm-qa.sh"
and the pwd should be the home of root "/",
if you do not do something before run pm-qa.sh,
I don't think there will be "cpuidle cpufreq cpuhotplug sched_mc suspend thermal utils" directories under the root directory.