Commit Graph

2824 Commits

Author SHA1 Message Date
Aurimas Liutikas
f2e4985ba0 Update default Java level for idegen.
This sets it to 1.8 instead of 1.7 as Android now allows using
1.8 java language.

Bug: 38140365
Test: Ran idegen and now java language is set to 1.8 in Intellij
Change-Id: I1a1f0970357f42c3bc5ded9b3f17692812ea130a
2017-05-09 08:08:07 -07:00
Joe Onorato
75f444e139 Add logblame and some log buffer tests.
A utility to read a logcat and print statistics about who is spamming the log.
And tests that use it

Bug: 37252687
Test: ./test_analyze.py ; test_logs.py ; test_ps.py
Change-Id: I811ba482b4be9779047f97c3f3b7ea5f996bd503
2017-04-26 19:21:20 -07:00
Colin Cross
6b42baad6e Merge "Use asm-5.2 prebuilts" am: 956ee36d17 am: b4f28cd8a0 am: cb51137278
am: 43d5cee460

Change-Id: I03a3fa19a8997eb54b398f7f531b834902a1821b
2017-02-14 19:27:14 +00:00
Colin Cross
61967edf02 Use asm-5.2 prebuilts
Test: m -j checkbuild tests cts
Change-Id: I737c9293662d1e9a5c47f174f160b9fd88bb3b5f
2017-02-13 12:54:21 -08:00
jackqdyulei
7902c8be05 Fix the build dir for check color
Bug: 32750778
Test: ./gradlew jar
Change-Id: Ib58b1b9a03d2fb78dc756757b8e0e16549312c1c
2017-02-10 14:05:24 -08:00
jackqdyulei
ddf9a631cc Create project to build the lint color check library
This project is used to create the jar library and will be hooked
to config_apps.py to create the build of jar.

The library built in this project will be used in
prebuilts/checkcolor

Bug: 32750778
Test: ./gradlew jar
Change-Id: I5ba3b94e6fe80ba1de71fdcbda5479a0f14d85ab
2017-02-01 16:10:57 -08:00
Fyodor Kupolov
7fb7f2bca1 Compute permissions against existing whitelists in /etc
Test: manual
Bug: 31008485
Change-Id: Icbcf2331dddabce06781d4c66eb5bd3a2966e49c
2017-01-18 17:40:51 -08:00
Aurimas Liutikas
296aa2e3f9 Merge "Remove checkstyle from development/checkstyle." am: 06b3b45f6f am: 327d16e647 am: 24cc2e3cf0
am: 12839fd97f

Change-Id: I7284363c3d413d193c799d5ea5b62baec3a858ad
2017-01-13 17:53:19 +00:00
Aurimas Liutikas
ecef09bfa1 Remove checkstyle from development/checkstyle.
Checkstyle was moved to prebuilts/checkstyle as it is a better
place for a prebuilt jar. All the usages of checkstyle.py in
PREUPLOAD.cfg files has been updated to use the correct checkstyle
and this change should not affect anyone.

Bug: 33078621
Test: none
Change-Id: Ib2e4272a4bea7d16cccdebaeb407acbd7193f248
2017-01-12 18:34:00 -08:00
Roozbeh Pournader
90689d9044 Rename language+country resources to just language
Bug: 26496609
Test: none
Change-Id: I0c6bbf6f487ad1117dd8dfae11fb0a8534ccaec4
2017-01-10 23:30:24 -08:00
Aurimas Liutikas
4396721c54 Merge "Add androidTest to test folder names." am: 35b0cafbc2 am: 5f503e25b8 am: 3b4f393ca4
am: a94939b2f3

Change-Id: I2c4719bec490113cb3286e6790ae85ea37dd2274
2016-12-09 00:11:17 +00:00
TreeHugger Robot
28c795c54b Merge changes from topic 'monkey and bugreport tools'
* changes:
  Add a command to run monkeys locally over and over again and collect the results.
  Add --logcat which will use an external logcat file instead of the one in the bugreport.
  Add an bugreport command which can format the output of an anr from a monkey run into a nice html file.
  Send monkey logs to logcat as well.
  Add --match-description to Monkey
2016-12-08 03:14:23 +00:00
Yigit Boyar
e6aa64fdad Add androidTest to test folder names.
This conforms the docs here:
http://tools.android.com/tech-docs/new-build-system/user-guide

Change-Id: I6d91073924f578e813986f458b391c9b1dcf923c
2016-12-07 17:30:49 -08:00
Joe Onorato
186e55cfcc Add a command to run monkeys locally over and over again and collect the results.
Change-Id: I1623552582a07ddcd3de79332bbb0b00f0a793e2
2016-12-07 17:07:08 -08:00
Joe Onorato
c898541ae2 Add --logcat which will use an external logcat file instead of the one in the bugreport.
Change-Id: Ifcdafd56edbc0b15207777427f501eb9e00b3a0d
2016-12-07 17:07:00 -08:00
Joe Onorato
978c5dd2c8 Add an bugreport command which can format the output of an anr from a monkey run into a nice html file.
Change-Id: I01a922860a5a90cda27d338ae0f99cd36176af99
2016-12-07 17:06:47 -08:00
Aurimas Liutikas
c5dbc099d6 Merge "Support for ignore checkstyle files" am: 453a71d710 am: 92ae646407 am: 57f03de316
am: 404deced68

Change-Id: I5aa4a2a6b08255d27b07ddd062c986a748469066
2016-12-08 00:09:08 +00:00
Aurimas Liutikas
453a71d710 Merge "Support for ignore checkstyle files" 2016-12-07 23:49:34 +00:00
Yigit Boyar
99f3d7af24 Support for ignore checkstyle files
This CL extends checkstyle check to search for IGNORE_CHECKSTYLE
files in folders which marks them as excluded from checkstyle,
including their sub folders

Change-Id: Id2390bb2a92e03f49c0014888e21549279e4bab6
2016-12-07 10:27:35 -08:00
Alan Viverette
8ec85d6c93 Merge "Allow passing custom checks to checkstyle" am: 32abb71122 am: d5f8802f6c am: c644754416
am: 79ceda2307

Change-Id: Id6390f3c537434061d80866e736cffdb34d72b85
2016-12-05 19:47:48 +00:00
Alan Viverette
50fb0a915b Allow passing custom checks to checkstyle
Bug: 32998581
Change-Id: Icf349a8ff47ebc434958b872f5729b126e67bcbb
2016-12-05 12:44:23 -05:00
Aurimas Liutikas
51ff85e3e6 Merge "Removing pre-push.py git hook for checkstyle." am: fff72bd810 am: 3475b7f16d am: c114d50846
am: 7eee848ae3

Change-Id: I3ee2f0f9fd6ff79be35bd82290fde9e6984f95a9
2016-11-30 22:25:31 +00:00
Aurimas Liutikas
fff72bd810 Merge "Removing pre-push.py git hook for checkstyle." 2016-11-30 22:02:31 +00:00
Paul Duffin
750e4745a2 Merge "Use junit-host instead of junit" am: 06c7276db4 am: 189889b554 am: 445c41ff48
am: 5f261085df

Change-Id: Ie9d535b17b8f395b886db9f48b156ccfd23300a9
2016-11-29 11:37:36 +00:00
Paul Duffin
f171d02a9b Use junit-host instead of junit
Bug: 30188076
Test: make checkbuild
Change-Id: I81cbfc9d380576442d8877b61a25c4dc5ac62205
2016-11-29 11:04:58 +00:00
Aurimas Liutikas
68ddad34c1 Merge "Loosen up the checks for test class paths in Checkstyle." am: 2c1ef76cc6 am: 46d5e59b93 am: 8d7d47941d
am: c2973bde08

Change-Id: Icf1b8527075cab901f65451123ebfd2893935c76
2016-11-22 23:10:57 +00:00
Aurimas Liutikas
1253b5accf Loosen up the checks for test class paths in Checkstyle.
This change allows us to skip javadoc checks for such test directories:
- cts/tests/tests/
- /test/src/

Test: none
Change-Id: I6a3bedaed816a3e764ca7e66ee364cd30e16c55b
2016-11-22 14:51:02 -08:00
Aurimas Liutikas
17ddda9485 Merge "Reland allowing MockitoAnnotations.* as static import." am: 7a00bf40dc am: 6db2a96c03 am: 778e216faf
am: 9ca82ecf26

Change-Id: Iaff2b3ce58f5be430154778827b5f83fc5ef2f71
2016-11-21 18:08:35 +00:00
Aurimas Liutikas
0f2de36ee9 Reland allowing MockitoAnnotations.* as static import.
It was originally added internally in ag/1085881, but then got
reverted via merge when android-styles.xml got split into multiple
files in r.android.com/305437

Bug: None
Test: None
Change-Id: I08bde16212c563a8d43995a97ffe47b2c43ed952
2016-11-18 17:12:12 -08:00
Aurimas Liutikas
44b6f1092b Removing pre-push.py git hook for checkstyle.
Checkstyle is now invoked using repo upload hooks and this script
is no longer needed.

Test: None
Change-Id: I2cdf38cc84c9f65efad76df1d58a5261b954fca8
2016-11-18 17:08:20 -08:00
Aurimas Liutikas
4b0b52c257 resolve merge conflicts of 69895b1 to master
Change-Id: I8f35e5a9c549b8f486dbeca07fc32c0f2fdab296
2016-11-18 17:00:30 -08:00
Aurimas Liutikas
36824c93ee Split android-style.xml into modules for checkstyle.
This will allow teams to reuse parts of checkstyle without having
to worry about missing any checks when they change in the main configs.

Bug: None
Test: Tested locally and checkstyle still verifies the same rules using android-style.xml
Change-Id: I91ca11d3d7089db656bc640549bd7012284a8859
2016-11-18 15:55:15 -08:00
Fyodor Kupolov
4ad5ccb8d9 Merge "Added privapp_permissions.py tool" 2016-11-15 19:29:15 +00:00
Fyodor Kupolov
62dd222bdb Added privapp_permissions.py tool
Test: privapp_permissions.py > privapp_permissions.xml
Bug: 31008485
Change-Id: I8afb83e4ab41ddefa1e9714442f49e0135289560
2016-11-14 15:02:10 -08:00
Aurimas Liutikas
98424ffc7f Merge "Skip all the ckecks for test data files." am: 57c81cf7ee am: 7aad65ea43 am: ee86fb2f0e
am: 70759ba1cf

Change-Id: I2a626184cc1e0cb6501da26bb8df0c2d30214569
2016-11-10 22:38:36 +00:00
Aurimas Liutikas
2ae3a31c44 Skip all the ckecks for test data files.
Test: None
Change-Id: I492f1c7f97455fa08f135b375db7abb9d734c4b7
2016-11-10 13:36:31 -08:00
Aurimas Liutikas
adc60e33da Merge "Print the project name if available when running Checkstyle." am: 2e625b0d3e am: c85d7f8492 am: 45d65adcc1
am: bdcb640e19

Change-Id: I9f282ec244b576e76410611c5d409d1af90219cb
2016-11-03 22:17:07 +00:00
Aurimas Liutikas
e847694a3d Print the project name if available when running Checkstyle.
Add [project/foo/bar] to the beginning of each Checkstyle error line
if the REPO_PROJECT environmental variable is set (set by repo hooks).

Test: manually attempted to run checkstyle.
Change-Id: I8ccf76d9ce9306668109029267081924300cb6ce
2016-11-03 09:45:33 -07:00
Aurimas Liutikas
34d9fd4a30 Merge "Correct the previous patch for test file subpaths in Checkstyle." am: e958ddb230 am: 36cea17013 am: a6381cac67
am: bc071ef404

Change-Id: I127dc8eed3e0bf93a927e5eccac44175498f1aee
2016-11-03 16:21:29 +00:00
Aurimas Liutikas
e9eaf62130 Correct the previous patch for test file subpaths in Checkstyle.
Instead of /tests/* allow /src/test/* subpath to be marked as test code.

Test: None
Change-Id: I6e9699a34de6d2bc167afa80539949be5a6a8907
2016-11-02 17:32:34 -07:00
Aurimas Liutikas
2efcbf2af5 Merge "Expand the allowed subpaths for test directories." am: 04fd23f7e4 am: 1149bcf590 am: 9c0e0deb80
am: 1f6c5fdc52

Change-Id: Idd29408f17aada32114f3ac6c812acee3eaced79
2016-11-02 23:22:58 +00:00
Aurimas Liutikas
5a4c535344 Expand the allowed subpaths for test directories.
Include /test/* in addition to /tests/*.

Test: None
Change-Id: I3f09596cfe97c40bb3c30288de2e6696c4a5725b
2016-11-02 16:00:01 -07:00
Aurimas Liutikas
c42b8e8bb0 Merge "Add tests/test-data/ to test file list for Checkstyle" am: aa2ea17237 am: 646db5802a am: a12b72439c
am: 86462d00e1

Change-Id: I76fe3bc4a126382001d9d7a563ebb1b77ea4d90a
2016-10-28 17:40:56 +00:00
Aurimas Liutikas
794494e88f Add tests/test-data/ to test file list for Checkstyle
This will skip javadoc checks for Java files in tests/test-data.

Bug: None
Test: None
Change-Id: I517f7d28d49e66c6c7029787e377fbbfe6df8154
2016-10-28 10:08:35 -07:00
Aurimas Liutikas
159ad93394 Merge "Add file whitelisting capabilities to checkstyle.py" am: 837e792666 am: 04e2e2dc41 am: 6a51e0d6be
am: 18dccc569f

Change-Id: I903cee66412e0e0e2e36e7102932cc6765ec993c
2016-10-12 17:53:32 +00:00
Aurimas Liutikas
21b3a7463b Add file whitelisting capabilities to checkstyle.py
Certain projects might want to enable checkstyle gradually so
we need a way to whitelist which files should be checked.

Test: added test_FilterFiles
Change-Id: I501677ce824f882ccb5f2ad129af8f596d01c6e8
2016-10-11 13:52:46 -07:00
Aurimas Liutikas
d7c9736408 Merge "Disable Checkstyle checks on auto-generated files." am: 518e6c3a28 am: af779fe149 am: 2378d4c491
am: 371f7e181f

Change-Id: I1e1806d4a905b293bebe8d719576ec463b862337
2016-09-21 21:06:54 +00:00
Aurimas Liutikas
b40478c7fa Disable Checkstyle checks on auto-generated files.
Add a check to ignore changes to automatically generated classes.

Bug: None
Test: Tried to run checkstyle locally on a file that containted the comment
      and checkstyle script showed no warnings even though that file had issues.
Change-Id: If9085948f1c224dbb53255b2ba1601511ef769dd
2016-09-20 16:46:12 -07:00
Aurimas Liutikas
e71af079f3 Merge "Do not warn about uncommited files if sha is set explicitly." am: f32000dda2 am: bf406fd592 am: f3637cd006
am: ebd8b74b5c

Change-Id: If172b7623f276bb22dcadb94361f7459e9d1fc1c
2016-09-20 18:17:59 +00:00
Aurimas Liutikas
fc518c714c Do not warn about uncommited files if sha is set explicitly.
Bug: 31603810
Test: Added test_GetModifiedFilesUncommittedExplicitCommit, all tests pass
Change-Id: I953f22df5be8030fc8a7145531026220c97a8dd8
2016-09-20 10:23:34 -07:00