|
|
Created:
8 years, 3 months ago by yongsheng Modified:
8 years, 3 months ago CC:
chromium-reviews, peter+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy+watch_chromium.org, Shouqun Liu Visibility:
Public. |
DescriptionThe 'test' command is not always usable on android
In emulator or some devices, there is no 'test' command. So workaround
this by using 'ls' to do this kind of check.
BUG=
TEST=run_test.py
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=155170
Patch Set 1 #
Total comments: 6
Patch Set 2 : Refine it #Messages
Total messages: 15 (0 generated)
hi, owners, I can't run unit tests in emulators without this patch. That's because emulators don't support 'test' or 'if -f' commands. So could you please help review it?
lgtm, thanks for the fix!
On 2012/09/05 13:44:23, bulach wrote: > lgtm, thanks for the fix! thanks. Sami, do you have any comments?
On 2012/09/06 00:45:44, yongsheng wrote: > Sami, do you have any comments? I think your fix looks fine, lgtm. Thanks for making this work.
On 2012/09/06 09:34:14, Sami wrote: > On 2012/09/06 00:45:44, yongsheng wrote: > > Sami, do you have any comments? > > I think your fix looks fine, lgtm. Thanks for making this work. ok, thanks you two.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yongsheng.zhu@intel.com/10910087/1
Change committed as 155170
:'( Y'all, careful with find! https://chromiumcodereview.appspot.com/10930002/
https://chromiumcodereview.appspot.com/10910087/diff/1/build/android/pylib/an... File build/android/pylib/android_commands.py (right): https://chromiumcodereview.appspot.com/10910087/diff/1/build/android/pylib/an... build/android/pylib/android_commands.py:1014: if not status[0].find('test: not found'): This seems overly protective, can we just assume the test command will exist on the device? https://chromiumcodereview.appspot.com/10910087/diff/1/build/android/pylib/an... build/android/pylib/android_commands.py:1018: if not status[0].find('No such file or directory'): change to: 'No such file or directory' not in status[0]
thanks. http://codereview.chromium.org/10910087/diff/1/build/android/pylib/android_co... File build/android/pylib/android_commands.py (right): http://codereview.chromium.org/10910087/diff/1/build/android/pylib/android_co... build/android/pylib/android_commands.py:1014: if not status[0].find('test: not found'): On 2012/09/07 01:02:38, Isaac wrote: > This seems overly protective, can we just assume the test command will exist on > the device? I run this on emulators for ARM and x86, both of them don't have this kind of 'test' command. http://codereview.chromium.org/10910087/diff/1/build/android/pylib/android_co... build/android/pylib/android_commands.py:1018: if not status[0].find('No such file or directory'): On 2012/09/07 01:02:38, Isaac wrote: > change to: > > 'No such file or directory' not in status[0] So below patch is also for this issue. Need I change it here? http://codereview.chromium.org/10930002
http://codereview.chromium.org/10910087/diff/1/build/android/pylib/android_co... File build/android/pylib/android_commands.py (right): http://codereview.chromium.org/10910087/diff/1/build/android/pylib/android_co... build/android/pylib/android_commands.py:1014: if not status[0].find('test: not found'): On 2012/09/07 01:07:05, yongsheng wrote: > On 2012/09/07 01:02:38, Isaac wrote: > > This seems overly protective, can we just assume the test command will exist > on > > the device? > I run this on emulators for ARM and x86, both of them don't have this kind of > 'test' command. See the error in emulators: invalid literal for int() with base 10: 'test: not found\r\n127\r\n'
upload a new one. please have a check.
On 2012/09/07 01:30:13, yongsheng wrote: > upload a new one. please have a check. @Issac and @nduca, if no other comments, I'll re-land it again. Thanks.
When you upload the new CL add me to the review and I'll check it over. Thanks! http://codereview.chromium.org/10910087/diff/1/build/android/pylib/android_co... File build/android/pylib/android_commands.py (right): http://codereview.chromium.org/10910087/diff/1/build/android/pylib/android_co... build/android/pylib/android_commands.py:1018: if not status[0].find('No such file or directory'): That patch wasn't landed (it's going to be abandoned). Instead, we reverted this one. You'll need to make a new CL if you want to reland.
On 2012/09/10 01:48:45, Isaac wrote: > When you upload the new CL add me to the review and I'll check it over. > Thanks! > > http://codereview.chromium.org/10910087/diff/1/build/android/pylib/android_co... > File build/android/pylib/android_commands.py (right): > > http://codereview.chromium.org/10910087/diff/1/build/android/pylib/android_co... > build/android/pylib/android_commands.py:1018: if not status[0].find('No such > file or directory'): > That patch wasn't landed (it's going to be abandoned). Instead, we reverted > this one. > > You'll need to make a new CL if you want to reland. ok, i'll create a new one. Thanks. |