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

Issue 413983003: Refactor infra git libs and testing. (Closed)

Created:
6 years, 5 months ago by iannucci
Modified:
6 years, 4 months ago
Reviewers:
Vadim Sh., agable
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/infra/infra.git@master
Project:
infra
Visibility:
Public.

Description

Refactor infra git libs and testing. Takes advantage of new expect_tests features like autoloading and per-Test coverage. All 88 tests now run just by invoking `./test.sh` in the root, and all test names match the natural namespace of their packages. These tests' matching files are also at 100% coverage. Additionally, this enables PRESUBMIT checking of all test cases. Rewrite of https://codereview.chromium.org/355153002/ R=agable@chromium.org, vadimsh@chromium.org BUG= Committed: https://chromium.googlesource.com/infra/infra/+/d5935d9724a401eada3934e12e1227bfec6622a3

Patch Set 1 #

Total comments: 33

Patch Set 2 : add deps on new expect_tests and testing_support #

Patch Set 3 : Address comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1102 lines, -5139 lines) Patch
A .coveragerc View 1 chunk +3 lines, -0 lines 0 comments Download
M PRESUBMIT.py View 3 chunks +16 lines, -7 lines 0 comments Download
M bootstrap/deps.pyl View 1 1 chunk +4 lines, -4 lines 0 comments Download
A infra/libs/decorators/__init__.py View 1 chunk +5 lines, -0 lines 0 comments Download
A infra/libs/decorators/decorators.py View 1 chunk +56 lines, -0 lines 0 comments Download
A + infra/libs/decorators/test/__init__.py View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A infra/libs/decorators/test/decorators_test.py View 1 2 1 chunk +60 lines, -0 lines 0 comments Download
A infra/libs/git2/__init__.py View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
A infra/libs/git2/commit.py View 1 2 1 chunk +79 lines, -0 lines 0 comments Download
A + infra/libs/git2/config_ref.py View 1 2 2 chunks +23 lines, -22 lines 0 comments Download
A infra/libs/git2/data/__init__.py View 1 chunk +18 lines, -0 lines 0 comments Download
A + infra/libs/git2/data/commit.py View 2 chunks +5 lines, -22 lines 0 comments Download
A infra/libs/git2/data/data.py View 1 chunk +24 lines, -0 lines 0 comments Download
A + infra/libs/git2/data/test/__init__.py View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/libs/git2/data/test/commit_test.py View 1 chunk +1 line, -1 line 0 comments Download
A infra/libs/git2/ref.py View 1 2 1 chunk +64 lines, -0 lines 0 comments Download
A + infra/libs/git2/repo.py View 1 2 4 chunks +8 lines, -142 lines 0 comments Download
A + infra/libs/git2/test/__init__.py View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A infra/libs/git2/test/commit_test.py View 1 2 1 chunk +56 lines, -0 lines 0 comments Download
A + infra/libs/git2/test/config_ref_test.py View 1 2 3 chunks +28 lines, -10 lines 0 comments Download
A infra/libs/git2/test/ref_test.py View 1 2 1 chunk +68 lines, -0 lines 0 comments Download
A infra/libs/git2/test/repo_test.py View 1 2 1 chunk +99 lines, -0 lines 0 comments Download
A infra/libs/git2/test/test_util.py View 1 2 1 chunk +58 lines, -0 lines 1 comment Download
A infra/libs/git2/test/util_test.py View 1 chunk +63 lines, -0 lines 0 comments Download
A infra/libs/git2/util.py View 1 chunk +59 lines, -0 lines 0 comments Download
A infra/libs/infra_types/__init__.py View 1 chunk +7 lines, -0 lines 0 comments Download
A infra/libs/infra_types/infra_types.py View 1 2 1 chunk +83 lines, -0 lines 0 comments Download
A + infra/libs/infra_types/test/__init__.py View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A infra/libs/infra_types/test/infra_types_test.py View 1 2 1 chunk +85 lines, -0 lines 0 comments Download
M infra/services/gnumbd/__main__.py View 1 2 5 chunks +10 lines, -10 lines 0 comments Download
A + infra/services/gnumbd/gnumbd.py View 1 2 11 chunks +48 lines, -27 lines 0 comments Download
D infra/services/gnumbd/inner_loop.py View 1 chunk +0 lines, -351 lines 0 comments Download
D infra/services/gnumbd/support/config_ref.py View 1 chunk +0 lines, -63 lines 0 comments Download
D infra/services/gnumbd/support/data.py View 1 chunk +0 lines, -454 lines 0 comments Download
D infra/services/gnumbd/support/git.py View 1 chunk +0 lines, -270 lines 0 comments Download
M infra/services/gnumbd/support/util.py View 1 chunk +0 lines, -160 lines 0 comments Download
D infra/services/gnumbd/test/config_test.py View 1 chunk +0 lines, -52 lines 0 comments Download
D infra/services/gnumbd/test/data_test.py View 1 chunk +0 lines, -442 lines 0 comments Download
D infra/services/gnumbd/test/git_test.py View 1 chunk +0 lines, -244 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.py View 1 chunk +0 lines, -507 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/bad_position_footer.yaml View 1 chunk +0 lines, -42 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/bad_svn_footer.yaml View 1 chunk +0 lines, -42 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/branch.yaml View 1 chunk +0 lines, -338 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/branch_from_branch.yaml View 1 chunk +0 lines, -302 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/enforce_commit_timestamps.yaml View 1 chunk +0 lines, -68 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/extra_user_footer.yaml View 1 chunk +0 lines, -67 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/extra_user_footer_bad.yaml View 1 chunk +0 lines, -61 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/incoming_svn_id_drops.yaml View 1 chunk +0 lines, -48 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/manual_merge_commits_ok.yaml View 1 chunk +0 lines, -106 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/master_ahead.yaml View 1 chunk +0 lines, -43 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/master_ahead_tag_ahead_pending.yaml View 1 chunk +0 lines, -46 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/master_behind.yaml View 1 chunk +0 lines, -47 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/master_mismatch_and_pend.yaml View 1 chunk +0 lines, -50 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/master_tag_ahead_pending.yaml View 1 chunk +0 lines, -50 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/merge_commits_fail.yaml View 1 chunk +0 lines, -67 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/multi_pending.yaml View 1 chunk +0 lines, -60 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/no_number_on_parent.yaml View 1 chunk +0 lines, -20 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/no_pending_tag.yaml View 1 chunk +0 lines, -32 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/no_position_footer.yaml View 1 chunk +0 lines, -42 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/no_real_ref.yaml View 1 chunk +0 lines, -12 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/normal_update.yaml View 1 chunk +0 lines, -48 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/normal_with_master_lag.yaml View 1 chunk +0 lines, -114 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/steady_state.yaml View 1 chunk +0 lines, -53 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/tag_lagging.yaml View 1 chunk +0 lines, -88 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests.expected/tag_lagging_no_actual.yaml View 1 chunk +0 lines, -78 lines 0 comments Download
D infra/services/gnumbd/test/gnumbd_smoketests_main.py View 1 chunk +0 lines, -213 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.py View 1 2 8 chunks +27 lines, -24 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/bad_position_footer.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/bad_svn_footer.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/branch.yaml View 11 chunks +30 lines, -30 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/branch_from_branch.yaml View 6 chunks +15 lines, -15 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/enforce_commit_timestamps.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/extra_user_footer.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/extra_user_footer_bad.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/incoming_svn_id_drops.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/manual_merge_commits_ok.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/master_ahead.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/master_ahead_tag_ahead_pending.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/master_behind.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/master_mismatch_and_pend.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/master_tag_ahead_pending.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/merge_commits_fail.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/multi_pending.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/no_number_on_parent.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/no_pending_tag.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/no_position_footer.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/no_real_ref.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/normal_update.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/normal_with_master_lag.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/steady_state.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/tag_lagging.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test.expected/tag_lagging_no_actual.yaml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + infra/services/gnumbd/test/gnumbd_test_definitions.py View 1 chunk +1 line, -1 line 0 comments Download
D infra/services/gnumbd/test/util_test.py View 1 chunk +0 lines, -173 lines 0 comments Download
D infra/tools/bootstrap/__init__.py View 0 chunks +-1 lines, --1 lines 0 comments Download
D infra/tools/bootstrap/get_appengine/__init__.py View 0 chunks +-1 lines, --1 lines 0 comments Download
A test.py View 1 2 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
iannucci
never sent this either! PTAL
6 years, 5 months ago (2014-07-25 03:24:19 UTC) #1
agable
Mostly nits. https://chromiumcodereview.appspot.com/413983003/diff/1/infra/libs/decorators/decorators.py File infra/libs/decorators/decorators.py (right): https://chromiumcodereview.appspot.com/413983003/diff/1/infra/libs/decorators/decorators.py#newcode14 infra/libs/decorators/decorators.py:14: >>> class Test(object): Too bad we're not ...
6 years, 4 months ago (2014-07-25 21:03:39 UTC) #2
iannucci
fixed! PLGTM! https://chromiumcodereview.appspot.com/413983003/diff/1/infra/libs/decorators/decorators.py File infra/libs/decorators/decorators.py (right): https://chromiumcodereview.appspot.com/413983003/diff/1/infra/libs/decorators/decorators.py#newcode14 infra/libs/decorators/decorators.py:14: >>> class Test(object): On 2014/07/25 21:03:38, agable ...
6 years, 4 months ago (2014-07-26 00:18:44 UTC) #3
agable
LGTMZORZ https://chromiumcodereview.appspot.com/413983003/diff/60001/infra/libs/git2/test/test_util.py File infra/libs/git2/test/test_util.py (right): https://chromiumcodereview.appspot.com/413983003/diff/60001/infra/libs/git2/test/test_util.py#newcode1 infra/libs/git2/test/test_util.py:1: # Copyright 2014 The Chromium Authors. All rights ...
6 years, 4 months ago (2014-07-26 00:47:52 UTC) #4
iannucci
The CQ bit was checked by iannucci@chromium.org
6 years, 4 months ago (2014-07-26 01:07:34 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/iannucci@chromium.org/413983003/60001
6 years, 4 months ago (2014-07-26 01:08:01 UTC) #6
commit-bot: I haz the power
6 years, 4 months ago (2014-07-26 01:08:28 UTC) #7
Message was sent while issue was closed.
Change committed as d5935d9724a401eada3934e12e1227bfec6622a3

Powered by Google App Engine
This is Rietveld 408576698