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

Issue 3885001: Change Autotest status parser from fail-hard to fail-safe. (Closed)

Created:
10 years, 2 months ago by DaleCurtis
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

With this change the parse_line method will no longer throw assertion errors when reasons contain tab characters or invalid key=value pairs. As a side effect, improperly formatted key=value optional parts (and all valid key=value pairs after) will be rolled into the reason. I've added a new unit test, test_parse_line_handles_tabs_in_reason, and removed the now deprecated unit test, test_parse_line_fails_on_bad_optional_fields. A previous CL for multi-line support also used strip() on the status line when the pre-CL behavior would only remove trailing '\n'. I've reverted the code to reflect the original behavior. I'm open to suggestions on a more complete regex for matching key names. For our test base, \w is sufficient. Change-Id: I351a61080dd335aa591b90565b5cc53f558641e0 TEST=Unit tests plus in production runs. Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=e8dac7a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -15 lines) Patch
M tko/parsers/version_0.py View 1 chunk +17 lines, -10 lines 0 comments Download
M tko/parsers/version_0_unittest.py View 1 chunk +13 lines, -5 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
DaleCurtis
PTAL
10 years, 2 months ago (2010-10-19 19:18:27 UTC) #1
ericli
10 years, 2 months ago (2010-10-19 20:33:09 UTC) #2
LGTM.

Powered by Google App Engine
This is Rietveld 408576698