aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-19Fix regex in commit_msg_relnote_for_current_txt repo hook am: d7363ec065ndk-sysroot-r21Nick Anthony
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1344736 Change-Id: I38cfd364bf23c3ac851d66b4a6d6f87f62bcc9ce
2020-06-19Fix regex in commit_msg_relnote_for_current_txt repo hookandroid-r-beta-3android-r-beta-2Nick Anthony
The current (incorrect) regex only enforces a Relnote tag for current.txt files in the root directory of the repo. However, current.txt can be in any repo subdirectory, so we need to enforce it everywhere. This change removes the up carrot in the regex that enforces matches must start at the line start. Bug: 159449967 Test: ./pre-upload.py (with commit_msg_relnote_for_current_txt = true) Change-Id: I7555398df6edaf410af60ce0def05894ef53ea11
2020-06-11hooks: require a Relnote field when changing current.txt am: bf70aed747Nick Anthony
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1274027 Change-Id: Icd6bbf51132eff965b966bc195ad05ab11db307a
2020-06-11utils: run: fix stderr set as str instead of bytes am: 5664c11635Mike Frysinger
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1315257 Change-Id: Icf32a67ac7a053f7ca3b160d33ee9c7fd327845b
2020-06-11hooks: rustfmt: fix pylint warning am: ed81c3526aMike Frysinger
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1312703 Change-Id: I05a3b213888f23df3f60c8a0355bd5d3845639a1
2020-06-11pylint: find Python 3 version better am: da09d40474Mike Frysinger
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1312702 Change-Id: Ifc34cbe6d6dee84f7e2ca27ab48a9fcc6e77aded
2020-06-11Merge "Add rustfmt checks" am: b13418d22cTreehugger Robot
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1294805 Change-Id: I7abaa949416092ef8314725dc749a2b6a68472df
2020-06-11utils: sudo_run: delete am: 95222193d7Mike Frysinger
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1293391 Change-Id: I48266f5b64979527b7ddf0ab25b6c73c17bf8359
2020-06-11utils: run: rename internal stdout/stderr vars am: 2bbd47c729Mike Frysinger
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1283952 Change-Id: I2b8d08e6a516a09a6ebd55b1a2b86013d8125c7c
2020-06-11utils: run: remove redundant redirect settings am: 7bd2a9a014Mike Frysinger
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1283335 Change-Id: I91152aabb9fc576855b9dfaa93e2f807dc1c3989
2020-06-11Merge "Added keyword ${PREUPLOAD_FILES_PREFIXED}." am: dc1782f93dTreehugger Robot
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1254666 Change-Id: Ifa20624594c7150a22f7305986d52c50252b0f17
2020-06-11hooks: bind stdin all the time am: 9ccb9cef89Mike Frysinger
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1271170 Change-Id: I807a79409087173a7b9ead04f8ae0c2745954bb3
2020-06-11Merge "pre-upload: fix handling of silent tools" am: ea6ebde0caTreehugger Robot
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1271262 Change-Id: If37b25ac46e60e978016b34ab5c55584f31d560a
2020-06-11Add repo hook that checks formatting of Relnote: field am: 73316598e6Nick Anthony
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1252002 Change-Id: Id5ceb3167031f59e3a54bc0f7ecfb284c2cc97c9
2020-06-11hooks: make unittest match real code am: 4160208fcbMike Frysinger
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1253218 Change-Id: I58d386046e03a21b3529e6f992be7cd35e0da9c2
2020-06-11Merge "utils: _Popen: workaround Python 3.4.1+ subprocess locking bug" am: ↵Treehugger Robot
1a9db9fd1b Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1247709 Change-Id: I6e554659685c7d2e6115efb8310078b5d0482eb0
2020-05-21hooks: require a Relnote field when changing current.txtandroidx-sqlite-inspection-releaseNick Anthony
This changes adds a Repo Hook to enforce changes to public_plus_experimental_current.txt and current.txt contain a `Relnote: ` stanza in the commit message Bug: 152839957 Test: ./pre-upload.py Change-Id: Idae708077dfbc5fa750b6193734635f9054ce37f
2020-05-20utils: run: fix stderr set as str instead of bytesMike Frysinger
We expect stderr/stdout to be bytes so we can convert them to strings in the common code path at the end, so don't set the stderr to a string lest we crash when we try to convert it to a string the second time. Bug: 157092332 Test: `repo upload` with bump PREUPLOAD.cfg shows proper error Change-Id: Iad4168d9d9c1fb5341854b0de7add5d86cfcaf09
2020-05-16hooks: rustfmt: fix pylint warningMike Frysinger
Bug: 153652717 Test: `repo upload` is clean again Change-Id: Ie1af057ab312cd007d1b05b024d29114d7a24b28
2020-05-15pylint: find Python 3 version betterMike Frysinger
Recent distros have stopped installing `pylint3` and only provide a Python 3 version of `pylint`. Probe the different program versions to find the right Python 3 one. Bug: 156539461 Test: `repo upload` can find pylint3 version on gLinux Change-Id: I431eb538b5d4fcbaffe75b424e6ff9814228b17d
2020-04-27Merge "Add rustfmt checks"Treehugger Robot
2020-04-26Add rustfmt checksRichard Zhang
This will run rustfmt on all diffed rust files Test: check_rustfmt and manual testing Bug: 153652717 Change-Id: I990f22b92b976ad9b5d05304c66151b70102fb6f
2020-04-22utils: sudo_run: deleteMike Frysinger
We were using this function in only one error case in one scenario that shouldn't really happen. Expecting to get access to root in general & invoking sudo is weird for tests, so don't even try to support it. If we hit this situation, let's abort and make the user clean things up. Bug: None Test: preupload unittests pass Change-Id: Ie1ac33b477b46ddacf372b661f160421ec61049b
2020-04-09utils: run: rename internal stdout/stderr varsMike Frysinger
We're going to make these into function arguments, so rename the internal vars to avoid confusion when we do. Change-Id: I6c6c807b94375ef109dadc37dade0490e4884b6c Bug: None Test: unittests pass
2020-04-09utils: run: remove redundant redirect settingsMike Frysinger
capture_output=True implies both redirect_std{out,err}=True so we can delete the latter settings when the former is active. Change-Id: I2ad9383b3c0ea244b8984577ca4196f5980c76a7 Bug: None Test: unittests pass
2020-04-07Merge "Added keyword ${PREUPLOAD_FILES_PREFIXED}."androidx-swiperefreshlayout-releaseandroidx-emoji-releaseandroidx-customview-releaseTreehugger Robot
2020-03-29hooks: bind stdin all the timeMike Frysinger
Since we always capture the output, make sure we disconnect stdin. Otherwise tools that try to read from stdin look like they hang as the user isn't able to see anything. Bug: None Test: custom hook that reads stdin finishes Change-Id: I4360ef79c120770b45d6f7ee0c8cfaaba4643faf
2020-03-28Added keyword ${PREUPLOAD_FILES_PREFIXED}.Sergey
The keyword is expanded so that each file is preceded by the same option that precedes this keyword. Bug: 142016614 Test: unittests pass Change-Id: I6ca7ee03f252dbc9dafe3bfba7b157e58f8fecd7
2020-03-28Merge "pre-upload: fix handling of silent tools"Treehugger Robot
2020-03-27pre-upload: fix handling of silent toolsMike Frysinger
Our output combining logic ends up treating empty outputs as if there were no errors/warnings in the first place. Stop overloading the use of strings here so we correctly handle errors/warnings even if they're silent in their outputs. Bug: None Test: upload with some test PREUPLOAD.cfg set to `exit 1` Change-Id: I8d4d438fc3950d1a396db54014ecf1899f02d9f0
2020-03-10Add repo hook that checks formatting of Relnote: fieldandroid-r-preview-4android-r-preview-3android-r-preview-2Nick Anthony
1. Checks for possible misspellings of the Relnote: field 2. Checks for the case of a multiline release note that is not wrapped in quotes Bug: 150889394 Test: ./pre-upload.py Change-Id: I741da0c687ceb56e34ae19fd2f3e19d8bd5862d3
2020-03-10hooks: make unittest match real codeMike Frysinger
We allow hooks to return falsey values (like []) in addition to None when things pass. All this in unittests too. Bug: 150889394 Test: unittests pass Change-Id: Iabae495819a5236bd30983082cc527b6ed867c44
2020-03-07Merge "utils: _Popen: workaround Python 3.4.1+ subprocess locking bug"Treehugger Robot
2020-03-02utils: _Popen: workaround Python 3.4.1+ subprocess locking bugMike Frysinger
Python 3.4.1 changed behavior where Popen APIs cannot be used from a signal handler when the Popen object was in use when the signal was delivered due to holding a threading lock. Add some internal helpers to workaround it. See the upstream bug report for more details: https://bugs.python.org/issue25960 Bug: 150647916 Bug: crbug.com/1022187 Test: unittests pass Change-Id: I8669ef7fdf5cdc4746e8bc83db04be64ac8dc073
2020-02-15README: fix up a few header levels am: 0f5c4fea8c am: 030a5eb365 am: 5d873d1398Mike Frysinger
Change-Id: I4e768953f68ef6c1d599ca32766c9ccc2b1ce0db
2020-02-15README: fix up a few header levels am: 0f5c4fea8c am: 030a5eb365Mike Frysinger
Change-Id: Id847706fcbe5940cbd1b476eac743ee051dcdd97
2020-02-15README: fix up a few header levels am: 0f5c4fea8ctemp_sam_242648940temp_sam_168057903temp_QQ3A.200605.002temp_273316506_tm-qpr2sam_222710654Mike Frysinger
Change-Id: I127cd6e9ead83c9150d62fdafcd86a78e3819599
2020-02-14README: fix up a few header levelsMike Frysinger
These were indented one-too-many causing them to be under the wrong parent section. Bug: None Test: looked at the output in gitiles Change-Id: I7b97fe64e357fa4ab2d55c372f124e85d75028e7
2020-02-14pre-upload: start warning about older Python 3 versions am: d89347c963 am: ↵Mike Frysinger
3e631f866e am: 0e569388fe Change-Id: I06c2131efc458dad61afb55b2fce91d894c6ecc1
2020-02-14pre-upload: start warning about older Python 3 versions am: d89347c963 am: ↵Mike Frysinger
3e631f866e Change-Id: Ibf3f93baac0cab967a8367e33261a5268e80dab1
2020-02-14pre-upload: start warning about older Python 3 versions am: d89347c963Mike Frysinger
Change-Id: I9aa21b4aae1acafce79de7964f22b03796270260
2020-02-14pre-upload: start warning about older Python 3 versionsMike Frysinger
Let people know we're going to be dropping support so they can migrate before we actually cut them off. Bug: None Test: unittests pass Change-Id: I74734b43341b961a63a1b0ca96c13dbcad59d250
2019-12-18utils: rename RunCommandError to CalledProcessError am: 36d2ce6275 am: ↵Automerger Merge Worker
b49ab82c5e am: a2093bdfa8 Change-Id: Icff10832843acc654a0ea07820d894ba7d945440
2019-12-18utils: rename RunCommandError to CalledProcessError am: 36d2ce6275 am: ↵Automerger Merge Worker
b49ab82c5e Change-Id: Ic5aa44060359ad58cab89c7c5cf1a7f8f9581ad3
2019-12-18utils: rename RunCommandError to CalledProcessErrorMike Frysinger
am: 36d2ce6275 Change-Id: I15c5bae2ae73df5a65f6246dc5e526845df9f4c2
2019-12-18utils: RunCommandError: drop eq/ne support am: f482d76353 am: 6b8204fb03 am: ↵Automerger Merge Worker
d0355d87d2 Change-Id: I7befee690401c8dc18d6b5b9ab91e3662f20766c
2019-12-18utils: RunCommandError: drop eq/ne support am: f482d76353 am: 6b8204fb03Automerger Merge Worker
Change-Id: I2c0a5ab485a0a0173c9111d3804d69f509945ea2
2019-12-18utils: RunCommandError: drop eq/ne supportMike Frysinger
am: f482d76353 Change-Id: I0f7d200840cd93f7810140a59d74b43104344aa1
2019-12-18utils: rename RunCommandError to CalledProcessErrorandroid-r-preview-1android-games-sdk-unity-releaseandroid-games-sdk-unity-devMike Frysinger
The Python 3.6 subprocess uses the |CalledProcessError| name. Also adjust all of its attributes to match. Bug: None Test: unittests pass Change-Id: I2474e7e74b259b4082824fe573337329a94bc751
2019-12-18utils: RunCommandError: drop eq/ne supportMike Frysinger
We don't compare exceptions anywhere. Drop support for it as this code would need to get more complicated with the next updates. Bug: None Test: unittests pass Change-Id: I3e603119bc69aac98a72e005575b9777ce10806f