Simran Basi has posted comments on this change.
Change subject: autotest: spawn a complete set of end-to-end autoupdate tests
......................................................................
Patch Set 7: (37 inline comments)
K so I was Nit-picky and may have gone overboard but a lot of your alignment doesn't match the autotest standards.
In general: Align with the previous line, fit as many args as you can to 80 characters and wrap to the last open paren, etc.
Only when thats not possible then wrap using double indent (which is what you used mostly).
For strings that are too long just end at 80 chars or the last word and then continue on the next line. Python will automatically join the strings. And if they're not in an open paren just put it inside paren's.
I did point out a lot of violations about alignment but I may have missed some. But please take your time to go through and address this. Thanks!
....................................................
File site_utils/autoupdate/board.py
Line 12: os.getcwd(), 'board_config.ini')
Is there a reason for the newline? This looks short enough to be 1 line, and if not you can have one argument be on the first line and the second continue right below the paren.
....................................................
File site_utils/autoupdate/full_release_test.py
Line 42:
2 spaces between methods
Line 44: return 'mp' if self.mp_images else 'test'
Repeat: spacing
Line 47: return 'delta' if self.delta_update else 'full'
Repeat: spacing
Line 51: (self.board,
self.name, self.get_image_type(),
move over 1 space align with first element in (
Line 57: return '\n'.join([
alignment
Line 61: ])
Repeat: spacing
Line 65: ['%s%s%s' % (key, assign, val) for key, val in [
align with (
Line 78: # Global reference objects.
can you put these at the top of the file?
Line 95: source_image_uri = test_image.find_image_uri(
alignment
Line 99: return TestConfig(
alignment
Line 137: else:
if not mp_images: and get rid of the previous if
Line 146: (source_release, target_release) = \
don't use the '\' character for newline. wrap it all in parens
Line 153: 'unexpected delta target release: %s != %s (%s)',
align with ( and if its too long break the string up
Line 160: raise TestError(
alignment
Line 209: else:
if not mp_images: and get rid of the previous if
Line 216: logging.warning(
alignment
Line 224: test_config = generate_test_image_test_config(
alignment
Line 248: test_list += generate_npo_nmo_test_list(
alignment
Line 254: test_list += generate_fsi_test_list(
alignment
Line 325: if val is not None:
if val:
Line 326: if val is True:
if val:
Line 328: elif val is False:
elif not val:
....................................................
File site_utils/autoupdate/omaha.py
Line 23: '</o:gupdate>')
2 blank lines
....................................................
File site_utils/autoupdate/release.py
Line 12: _RELEASE_CONFIG_FILE = os.path.join(
alignment
Line 44: branchpoint_list = map(
alignment
Line 51: self._branchpoint_dict[branchpoint] = \
use paren not \
Line 53: _CONF_BRANCH_SECTION,
alignment
Line 58: _CONF_BRANCH_SECTION, _CONF_NEXT_BRANCH_OPT)
alignment
Line 103: i = bisect.bisect_left(
alignment
....................................................
File site_utils/autoupdate/test_image.py
Line 17: pass
4 spaces
Line 29: output = subprocess.Popen(
alignment
Line 63: if payload_uri_list_len == 0:
if not payload_uri_list_len:
Line 66: raise TestImageError(
alignment
Line 91: image_archive_uri_list = gs_ls(
alignment
Line 96: if image_archive_uri_list_len == 0:
if not image_archive_uri_list_len:
Line 99: raise TestImageError(
alignment
Gerrit-MessageType: comment
Gerrit-Change-Id: I6b1e6addc925b811f3b844caa7dc3c585f203a22
Gerrit-PatchSet: 7
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Gilad Arnold <
gar...@chromium.org>
Gerrit-Reviewer: Simran Basi <
sb...@chromium.org>
Gerrit-Reviewer: Tracy Turchetto <
tturc...@chromium.org>