Merge lp://staging/~kejun-zhou/lava-android-test/pm-qa into lp://staging/lava-android-test

Proposed by Kejun ZHOU
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
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.

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.

To post a comment you must log in.
Revision history for this message
Yongqin Liu (liuyq0307) wrote :

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.

review: Needs Fixing
Revision history for this message
Kejun ZHOU (kejun-zhou) wrote :

 24 busybox ln -s -f /system/bin/busybox wc
 25
 26 export PATH=/data/bin:$PATH
 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=`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.
> --
>
> https://code.launchpad.net/~kejun-zhou/lava-android-test/pm-qa/+merge/108892
> You are the owner of lp:~kejun-zhou/lava-android-test/pm-qa.
>

Revision history for this message
Yongqin Liu (liuyq0307) wrote :

> 24 busybox ln -s -f /system/bin/busybox wc
> 25
> 26 export PATH=/data/bin:$PATH
> 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?

Revision history for this message
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/bin:$PATH
> > 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://code.launchpad.net/~kejun-zhou/lava-android-test/pm-qa/+merge/108892
> You are the owner of lp:~kejun-zhou/lava-android-test/pm-qa.
>

155. By Ke Jun ZHOU <dp583@stebjsxu0119>

Change the "dir" to "file".

156. By Ke Jun ZHOU <dp583@stebjsxu0119>

 taskset is required by pm-qa.

Revision history for this message
Kejun ZHOU (kejun-zhou) wrote : Posted in a previous version of this proposal

Modify two parts at 15-Jun-2012

Revision history for this message
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-master-image-scripts$ adb shell cat /data/local/test.sh
#!/system/bin/sh

echo $SHELL
17:24:42 liuyq:lava-master-image-scripts$ adb shell /data/local/test.sh

17:24:47 liuyq:lava-master-image-scripts$ adb shell
root@linaro: /data/local/test.sh
/system/bin/sh
root@linaro: ^D
17:24:58 liuyq:lava-master-image-scripts$

93 + for tests_dirs in $tests_dirs
Also please make the two variable name different

And also please update this file:
lava-android-test/MANIFEST.in

review: Needs Fixing
157. By Ke Jun ZHOU <dp583@stebjsxu0119>

Use the /system/bin/sh directly.

158. By Ke Jun ZHOU <dp583@stebjsxu0119>

1. change "tests_dirs" to "dir" in pm-qa.sh
2. update the MANIFEST.in

Revision history for this message
Yongqin Liu (liuyq0307) wrote :

8 +<<<<<<< TREE
9 include lava_android_test/test_definitions/usbhardware/*
10 +=======
11 +include lava_android_test/test_definitions/pm-qa/*
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"

review: Needs Fixing
Revision history for this message
Kejun ZHOU (kejun-zhou) wrote :
Download full text (4.1 KiB)

(pm-qa)dp583@stebjsxu0119@~/linaro/lava/pm-qa
$ lava-android-test install pm-qa
LAVA: --Start Operation: Install test (pm-qa)
LAVA: Begin to execute command: adb push
/usr/local/lib/python2.6/dist-packages/lava_android_test-0.3-py2.6.egg/lava_android_test/test_definitions/pm-qa/pm-qa.sh
/data/lava-android-test/share/installed-tests/pm-qa/pm-qa.sh
LAVA: (stdout) 32 KB/s (1350 bytes in 0.040s)
LAVA: Begin to execute command: adb shell chmod 777
/data/lava-android-test/share/installed-tests/pm-qa/pm-qa.sh
LAVA: --End Operation: Install test (pm-qa)
(pm-qa)dp583@stebjsxu0119@~/linaro/lava/pm-qa
$ lava-android-test run pm-qa
LAVA: --Start Operation: Run test (pm-qa)
LAVA: Begin to execute command: adb shell
/data/lava-android-test/share/installed-tests/pm-qa/pm-qa.sh
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/xbin/pm-qa/cpuidle
LAVA: (stdout) ./cpuidle_01.sh
LAVA: (stdout) cpuidle_01.0: checking 'current_driver' exists...
                pass
LAVA: (stdout) cpuidle_01.1: checking 'current_governor_ro' exists...
               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...
                pass
LAVA: (stdout) cpuidle_01.10/cpu1: checking 'time' exists...
                pass
LAVA: (stdout) cpuidle_01.11/cpu1: checking 'usage' exists...
               pass
LAVA: (stdout) ./cpuidle_02.sh
LAVA: (stdout) ./cpuidle_02.sh[35]: [: gid...

Read more...

Revision history for this message
Yongqin Liu (liuyq0307) wrote :
Download full text (4.4 KiB)

The tests seems not run correctly.
It does not output the pm-qa=fail or pm-qa=pass result.

Thanks,
Yongqin Liu
> (pm-qa)dp583@stebjsxu0119@~/linaro/lava/pm-qa
> $ lava-android-test install pm-qa
> LAVA: --Start Operation: Install test (pm-qa)
> LAVA: Begin to execute command: adb push
> /usr/local/lib/python2.6/dist-
> packages/lava_android_test-0.3-py2.6.egg/lava_android_test/test_definitions
> /pm-qa/pm-qa.sh
> /data/lava-android-test/share/installed-tests/pm-qa/pm-qa.sh
> LAVA: (stdout) 32 KB/s (1350 bytes in 0.040s)
> LAVA: Begin to execute command: adb shell chmod 777
> /data/lava-android-test/share/installed-tests/pm-qa/pm-qa.sh
> LAVA: --End Operation: Install test (pm-qa)
> (pm-qa)dp583@stebjsxu0119@~/linaro/lava/pm-qa
> $ lava-android-test run pm-qa
> LAVA: --Start Operation: Run test (pm-qa)
> LAVA: Begin to execute command: adb shell
> /data/lava-android-test/share/installed-tests/pm-qa/pm-qa.sh
> 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/xbin/pm-qa/cpuidle
> LAVA: (stdout) ./cpuidle_01.sh
> LAVA: (stdout) cpuidle_01.0: checking 'current_driver' exists...
> pass
> LAVA: (stdout) cpuidle_01.1: checking 'current_governor_ro' exists...
> 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...
> ...

Read more...

Revision history for this message
Kejun ZHOU (kejun-zhou) wrote :
Download full text (5.0 KiB)

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)dp583@stebjsxu0119@~/linaro/lava/pm-qa
> > $ lava-android-test install pm-qa
> > LAVA: --Start Operation: Install test (pm-qa)
> > LAVA: Begin to execute command: adb push
> > /usr/local/lib/python2.6/dist-
> >
> packages/lava_android_test-0.3-py2.6.egg/lava_android_test/test_definitions
> > /pm-qa/pm-qa.sh
> > /data/lava-android-test/share/installed-tests/pm-qa/pm-qa.sh
> > LAVA: (stdout) 32 KB/s (1350 bytes in 0.040s)
> > LAVA: Begin to execute command: adb shell chmod 777
> > /data/lava-android-test/share/installed-tests/pm-qa/pm-qa.sh
> > LAVA: --End Operation: Install test (pm-qa)
> > (pm-qa)dp583@stebjsxu0119@~/linaro/lava/pm-qa
> > $ lava-android-test run pm-qa
> > LAVA: --Start Operation: Run test (pm-qa)
> > LAVA: Begin to execute command: adb shell
> > /data/lava-android-test/share/installed-tests/pm-qa/pm-qa.sh
> > 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/xbin/pm-qa/cpuidle
> > LAVA: (stdout) ./cpuidle_01.sh
> > LAVA: (stdout) cpuidle_01.0: checking 'current_driver' exists...
> > pass
> > LAVA: (stdout) cpuidle_01.1: checking 'current_governor_ro' exists...
> > 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
> > ...

Read more...

Revision history for this message
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

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches