Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Issue 3438007: Replace newline characters in factory tests (Closed)

Created:
10 years, 3 months ago by clchiou
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org, sosa+cc_chromium.org, seano+cc_chromium.org, ericli, petkov+cc_chromium.org
Visibility:
Public.

Description

Replace newline characters with "<br/>" in factory tests when raising test error exceptions, and replace them back to "\n" in factory_Review. This patch should make the status file easier to parse. BUG=chrome-os-partner:1080 TEST=manual Change-Id: Ide8389dcbf302af15ccea73b08a5f16dab01dd73 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=e29978a

Patch Set 1 #

Patch Set 2 : Address hungte's suggestion about hooking exception classes #

Total comments: 4

Patch Set 3 : Address Hung-Te's comments #

Total comments: 3

Patch Set 4 : Address Hung-Te's comments #

Total comments: 2

Patch Set 5 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -22 lines) Patch
A client/bin/factory_error.py View 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M client/site_tests/factory_Audio/factory_Audio.py View 1 1 chunk +2 lines, -1 line 0 comments Download
M client/site_tests/factory_Camera/factory_Camera.py View 1 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_DeveloperRecovery/factory_DeveloperRecovery.py View 1 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_Display/factory_Display.py View 1 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_Dummy/factory_Dummy.py View 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_EnableWriteProtect/factory_EnableWriteProtect.py View 1 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_ExtDisplay/factory_ExtDisplay.py View 1 1 chunk +2 lines, -1 line 0 comments Download
M client/site_tests/factory_ExternalStorage/factory_ExternalStorage.py View 1 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_Fail/factory_Fail.py View 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_Keyboard/factory_Keyboard.py View 1 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_Leds/factory_Leds.py View 1 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_LightSensor/factory_LightSensor.py View 1 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_Review/factory_Review.py View 2 chunks +4 lines, -3 lines 0 comments Download
M client/site_tests/factory_ScriptWrapper/factory_ScriptWrapper.py View 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_ShowTestResults/factory_ShowTestResults.py View 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_Touchpad/factory_Touchpad.py View 1 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_UploadLogs/factory_UploadLogs.py View 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_Verify/factory_Verify.py View 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_Wipe/factory_Wipe.py View 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/factory_WriteGBB/factory_WriteGBB.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
clchiou
10 years, 3 months ago (2010-09-16 03:49:36 UTC) #1
Hung-Te
What about hooking the error.TestError/TestFail? The newline is helpful when reading log on console
10 years, 3 months ago (2010-09-16 04:14:59 UTC) #2
clchiou
Thanks for the comments, Hung-Te. I forgot to reply you that I had rewrote based ...
10 years, 3 months ago (2010-09-17 02:13:51 UTC) #3
Hung-Te
http://codereview.chromium.org/3438007/diff/3001/4001 File client/bin/factory_error.py (right): http://codereview.chromium.org/3438007/diff/3001/4001#newcode1 client/bin/factory_error.py:1: from autotest_lib.client.common_lib import error Please add the copy right ...
10 years, 3 months ago (2010-09-17 11:37:37 UTC) #4
clchiou
Hi Hung-Te, Thanks for the comments. I've addressed them all. Please take a look when ...
10 years, 3 months ago (2010-09-20 04:00:52 UTC) #5
Hung-Te
http://codereview.chromium.org/3438007/diff/9001/10001 File client/bin/factory_error.py (right): http://codereview.chromium.org/3438007/diff/9001/10001#newcode12 client/bin/factory_error.py:12: globals().update( \ You don't need back-quote when you have ...
10 years, 3 months ago (2010-09-20 07:02:54 UTC) #6
clchiou
Hi Hung-Te, Thanks for the timely response. I've addressed your comments. Please take a look ...
10 years, 3 months ago (2010-09-20 10:25:20 UTC) #7
Hung-Te
LGTM with one more suggestion for coding style http://codereview.chromium.org/3438007/diff/2002/14002 File client/bin/factory_error.py (right): http://codereview.chromium.org/3438007/diff/2002/14002#newcode16 client/bin/factory_error.py:16: _glob[_name] ...
10 years, 3 months ago (2010-09-21 02:38:36 UTC) #8
clchiou
10 years, 3 months ago (2010-09-21 12:27:24 UTC) #9
Submit.  Thanks for the comments.

http://codereview.chromium.org/3438007/diff/2002/14002
File client/bin/factory_error.py (right):

http://codereview.chromium.org/3438007/diff/2002/14002#newcode16
client/bin/factory_error.py:16: _glob[_name] = type(_name, (_thing,),
dict(__str__=
On 2010/09/21 02:38:37, Hung-Te wrote:
> I think the proper coding style is to not break an a=b.
> 
> _new_str = lambda ...
> _glob[_name] .... __str__=_new_str)...

Done.

Powered by Google App Engine
This is Rietveld 408576698