Commit Graph

826 Commits

Author SHA1 Message Date
Amith Yamasani
2855028c8e Tests for idle parole when charging
Make sure that when switching between idle, paroled
and battery saver, the network availability of the app
is correctly updated.

Bug: 31399882
Test: cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testAppIdleNonMetered_whenCharging
Test: cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testAppIdleMetered_whenCharging
Change-Id: I060a0d5f9c3297430b5b623b389c1afdf6abde87
2016-09-19 13:33:27 -07:00
Stephen Li
987c7c6bc9 Revert "Manually merge commit '9be9d5865ba2584a251642359710c074061dee5e' into nyc-dev" am: 07f9388e4f -s ours
am: 9f775619f8

Change-Id: Id9eb8b95284a0da7480d974028d194ed0595735d
2016-09-14 23:15:33 +00:00
Stephen Li
9f775619f8 Revert "Manually merge commit '9be9d5865ba2584a251642359710c074061dee5e' into nyc-dev"
am: 07f9388e4f  -s ours

Change-Id: I974a69e7b44067a92c265f1076226850ffbff92b
2016-09-14 22:59:44 +00:00
Daniel Xie
cae16d2533 Manually merge commit '9be9d5865ba2584a251642359710c074061dee5e' into nyc-dev am: 253fdc667a -s ours
am: 3cccbf13bc

Change-Id: I2581fa08b2b9d9875ede207c1fef0dd510e9711f
2016-09-14 22:35:42 +00:00
Daniel Xie
3cccbf13bc Manually merge commit '9be9d5865ba2584a251642359710c074061dee5e' into nyc-dev
am: 253fdc667a  -s ours

Change-Id: I209c9227b5b9147e4d042c2db915ba0cb6935175
2016-09-14 22:27:07 +00:00
Stephen Li
07f9388e4f Revert "Manually merge commit '9be9d5865ba2584a251642359710c074061dee5e' into nyc-dev"
This reverts commit 253fdc667a.

Change-Id: If8862e289eb6693650713ff819c8b05f65cdeda5
2016-09-14 22:25:06 +00:00
The Android Automerger
253fdc667a Manually merge commit '9be9d5865ba2584a251642359710c074061dee5e' into nyc-dev
* commit '9be9d5865ba2584a251642359710c074061dee5e': (75 commits)
  CameraITS scene5 should be skipped if read_3a is not supported
  Added Bluetooth LE tests
  Add CTS tests for LocalSocket read/write timeouts
  Replace libziparchive-host with libziparchive
  Fix clang-tidy warnings in libjnitest.
  Fix clang-tidy warnings in librscpptest.
  Fix clang-tidy warnings in openglperf2.
  Fix clang-tidy warnings in audio_quality.
  Replaces pcre with pcre2
  Add Mockito to deps for Conscrypt tests and remove core-tests
  simpleperf_cts_test: link libevent.
  Add the new android kernel path to includes.
  FileSystemPermisionTest: Drop unused method
  Use mockito-target-minus-junit4.
  android.core.tests.libcore.package.tests: add mockito to the dependencies
  Fix misc-macro-parentheses warnings in cts.
  [RenderScript] Fix refocus test to accommodate different rounding behavior for half_sqrt().
  Remove data race from refocus test
  Remove one test from MediaCodecTest#testCreateInputSurfaceErrors.
  Return all errors, not only the first one.
  ...
2016-09-14 21:21:50 +00:00
Bill Yi
158bfbece5 Merge commit \'4158fbc54acdcb2c7cc52704a45e0e9f3e93ffe1\' into HEAD am: 02fa7b88cc am: ba68fcfa5a am: bf2d4c864a
am: 849aac5aab

Change-Id: Icf4e3f43f0ec8be45522ede339ef3688703532d6
2016-09-14 01:48:26 +00:00
Bill Yi
849aac5aab Merge commit \'4158fbc54acdcb2c7cc52704a45e0e9f3e93ffe1\' into HEAD am: 02fa7b88cc am: ba68fcfa5a
am: bf2d4c864a

Change-Id: Ie6f0aafa6a3a9bbbcdafb547a17c38c1e5d5672b
2016-09-14 01:33:25 +00:00
Bill Yi
bf2d4c864a Merge commit \'4158fbc54acdcb2c7cc52704a45e0e9f3e93ffe1\' into HEAD am: 02fa7b88cc
am: ba68fcfa5a

Change-Id: Ib31a984e09d82c65f217a4e92fe80176b1fb80a5
2016-09-14 01:22:14 +00:00
Daniel Xie
9be9d5865b Merge "CameraITS scene5 should be skipped if read_3a is not supported" into nougat-cts-dev 2016-09-09 03:33:03 +00:00
TreeHugger Robot
cd198fbef3 Merge "Add CTS tests for LocalSocket read/write timeouts" into nyc-mr1-dev 2016-09-06 21:20:20 +00:00
Neil Fuller
a8574413ed Add CTS tests for LocalSocket read/write timeouts
The behavior was not previous covered and broke in N
due to commit c80af6d8. There is an associated fix
in frameworks/base.

Some refactoring of existing tests to reduce
duplication and tidy up sockets after tests.

Test: Ran the new CTS test (before and after related fix)
Bug: 31205169
(cherry picked from commit 52376fc1c8)

Change-Id: I9ee96a91abbdaaba64c2f6daf49c92d1b23352e2
2016-08-31 18:18:02 +01:00
Neil Fuller
83bddfd9ec Merge "Add CTS tests for LocalSocket read/write timeouts" 2016-08-31 16:28:17 +00:00
Neil Fuller
52376fc1c8 Add CTS tests for LocalSocket read/write timeouts
The behavior was not previous covered and broke in N
due to commit c80af6d8. There is an associated fix
in frameworks/base.

Some refactoring of existing tests to reduce
duplication and tidy up sockets after tests.

Test: Ran the new CTS test (before and after related fix)
Bug: 31205169
Change-Id: Ie94335bc535beefcc5301d5469de6b8211af0bab
2016-08-31 13:12:54 +01:00
Felipe Leme
b0fc0ec688 DO NOT MERGE:Improve check for activity on top after launch. am: 9d8c5ba97e -s ours am: 6f82325df0
am: 3b8a14323c

Change-Id: I2a2229d49b67f64e339ddfeefe293858df57f372
2016-08-25 21:15:41 +00:00
Felipe Leme
3b8a14323c DO NOT MERGE:Improve check for activity on top after launch. am: 9d8c5ba97e -s ours
am: 6f82325df0

Change-Id: I9c306e97dfe3fad6b710f5e5323be9bf775bc157
2016-08-25 21:00:48 +00:00
Felipe Leme
6f82325df0 DO NOT MERGE:Improve check for activity on top after launch.
am: 9d8c5ba97e  -s ours

Change-Id: I81b40448821fa478355d048e566e3432a5d3bef9
2016-08-25 20:51:22 +00:00
Felipe Leme
2882cd2a7a Added tests for network restrictions while the screen is off.
BUG: 30785671
Change-Id: I1b211e545ff234272ff6acadfda9ce97765695a9
(cherry picked from commit b80a93061aa7d0a19b47a7dbb82f0dc06e3afb7e)
2016-08-20 03:58:09 +00:00
Felipe Leme
b7ff856a2a Improve check for activity on top after launch.
am: a871a99ebc

Change-Id: Ia2ae617d0c181eaed536ac81c6086d632fee6b24
2016-08-16 00:34:18 +00:00
Felipe Leme
9d8c5ba97e DO NOT MERGE:Improve check for activity on top after launch.
BUG: 30875754
Fixes: 30868243

Change-Id: Iad3d6ce80fcf24281e98251799c23abc9b83b52d
Change-Id: I8b7624e35caef107743d6 1f312e220f8bc21b9b8
2016-08-15 23:31:58 +00:00
Felipe Leme
a871a99ebc Improve check for activity on top after launch.
BUG: 30875754
Fixes: 30868243

Change-Id: I8b7624e35caef107743d61f312e220f8bc21b9b8
2016-08-15 15:50:38 -07:00
Neil Fuller
6406334d84 Merge "Initialize MockWebServer in setUp() not construction time"
am: f1026cb99e

Change-Id: I9c114d40171d73c90dcc4e2ef75a2239d39e4e81
2016-08-09 16:12:27 +00:00
Neil Fuller
f1026cb99e Merge "Initialize MockWebServer in setUp() not construction time" 2016-08-09 16:06:23 +00:00
Felipe Leme
9c1322683f Improvements on retry mechanism on network tests:
- Retry on all cases (not only when expecting connected).
- Uses exponential back-off for timeout.

BUG: 27803922
Fixes: 30509643

Change-Id: I42454f43158598a72e30f290c27c5a02e80ea6d2
2016-08-01 17:23:29 -07:00
Neil Fuller
a87e5240cc Initialize MockWebServer in setUp() not construction time
Should be a no-op but makes test suite creation cheaper.

Bug: 29820565
Change-Id: Ieee5568a6f477d591436275be4d4e7e3d5dbd322
2016-06-28 18:25:28 +01:00
Felipe Leme
e928006e67 Cover more PendingIntent whitelist scenarios.
BUG: 29480440
Change-Id: I961b765f40135efc06fbb3e5a4a94e8e333453da
2016-06-28 09:07:53 -07:00
Chih-hung Hsieh
9197c89071 resolve merge conflicts of 079d417 to stage-aosp-master
am: 64b0e44329

Change-Id: Ia3b91ebb942b4ab413ef4c76a06880c62e8581f9
2016-06-27 21:36:48 +00:00
Chih-Hung Hsieh
64b0e44329 resolve merge conflicts of 079d417 to stage-aosp-master
Change-Id: Ib8b7ed43d6c8dc4a9b843e6d2a974af30bcba0a0
2016-06-24 12:17:53 -07:00
Phil Weaver
3eab917a25 Merge \"CTS: Only listen to wifi events when toggling wifi\" into nyc-dev
am: 79fad1a209

Change-Id: Ieadf318b07d99acd8a2b73748fdac806731169d4
2016-06-23 01:57:27 +00:00
Phil Weaver
79fad1a209 Merge "CTS: Only listen to wifi events when toggling wifi" into nyc-dev 2016-06-23 01:48:11 +00:00
Phil Weaver
0d7d1da503 CTS: Only listen to wifi events when toggling wifi
When counting all connectivity changed events, we were failing
on devices with sim cards because we were counting both wifi and
mobile connectivity changes the same. Since the test only
toggles wifi, changing the listener only to pay attention to wifi
changes.

Bug: 29346253
Change-Id: I1ed3b976bc21419218c780d4afc4a5e73f128496
2016-06-22 16:50:38 -07:00
Chih-Hung Hsieh
60bd0b56fb Fix misc-macro-parentheses warnings in cts.
Add parentheses around macro arguments used beside operators.
Use 'aoto' type to avoid clang-tidy warnings of missing parentheses
of 'TYPE *'.

Bug: 28705665
Change-Id: I5d2c3b2bdfb7775200f31a011758b9a35b14794d
2016-06-22 14:29:53 -07:00
Daniel Xie
949d019a45 Merge \\\\\\"Remove non-CTS packets assertion code\\\\\\" into marshmallow-cts-dev am: 0ba763ab98 am: 6ce150c6ae am: 5c4a3982a8 am: fd1fb4d863 am: 995005d649
am: 86ba00d2a9

Change-Id: I5d1edb0f813aaf3aa6b4558e5ce21e6b60fa340d
2016-06-22 00:23:13 +00:00
Jun Tahara
86ba00d2a9 Merge \\\\\"Remove non-CTS packets assertion code\\\\\" into marshmallow-cts-dev am: 0ba763ab98 am: 6ce150c6ae am: 5c4a3982a8 am: fd1fb4d863
am: 995005d649

Change-Id: I40f34d7a22b09a4ef5a4190f2a236b643062f306
2016-06-22 00:20:07 +00:00
Jun Tahara
fd1fb4d863 Merge \\\"Remove non-CTS packets assertion code\\\" into marshmallow-cts-dev am: 0ba763ab98 am: 6ce150c6ae
am: 5c4a3982a8

Change-Id: Idcd4a248c8f74e095ba4162d8a468dbd962c8163
2016-06-22 00:14:51 +00:00
Jun Tahara
6ce150c6ae Merge \"Remove non-CTS packets assertion code\" into marshmallow-cts-dev
am: 0ba763ab98

Change-Id: I9d9549d4388af53475a0457f7be1d55d88d5e72d
2016-06-22 00:09:33 +00:00
Lorenzo Colitti
0aeb28ea33 Merge \"Clear local test results across DNS lookups.\" into nyc-dev
am: cbdcf1d183

Change-Id: Id9a662ddec527356e0c8a2850da2dabca8a44fb9
2016-06-21 06:33:08 +00:00
Lorenzo Colitti
abc35d5527 Clear local test results across DNS lookups.
If InetAddress.getAllByName("ipv6.google.com") throws
UnknownHostException, the test silently ignores it. This
causes a misleading failure, because the test then reuses the
addrs variable that is left over from the previous DNS query
for "www.google.com", and fails because it has an IPv4 address.

Fixes: 12210306
Bug: 29231261
Change-Id: I1dde945765d40a84eba139055306b07ebc97d0ec
2016-06-21 13:39:49 +09:00
Jun Tahara
349f7ed040 Remove non-CTS packets assertion code
Symptom:
testTrafficStatsForLocalhost fails when applications or services
except CTS are using network.

Root cause:
testTrafficStatsForLocalhost can't calculate the number of
non-localhost packets for CTS.
It includes the all of packets for applications/services except CTS
and non-localhost packets for CTS.

Solution:
Remove this assertion and only logging the number of packets.

Change-Id: I49243d59f359f3a543c6bdb46f6a2645cde8f292
2016-06-20 17:50:39 +09:00
Felipe Leme
5d53b301dc Merge \"Add non-parcelable extras to notification to make sure it does not crash the app.\" into nyc-dev
am: c72edd7a89

Change-Id: Icc8449c663d6fd97c8f8aff13afad936534a39a1
2016-06-16 18:35:13 +00:00
Felipe Leme
c3a9008e3d Add non-parcelable extras to notification to make sure it does not crash
the app.

BUG: 29402928
Change-Id: I4fc47535ae14e71c50b25285b2fe5375abdb4f11
2016-06-16 10:03:27 -07:00
Lorenzo Colitti
d1970e861b Merge \"Log the address of the IPv4 address that causes the test to fail.\" into nyc-dev
am: db3485a45e

Change-Id: Id3818163f9fef1b2ba9d7b29f6b0f84c6659625d
2016-06-09 07:53:30 +00:00
TreeHugger Robot
db3485a45e Merge "Log the address of the IPv4 address that causes the test to fail." into nyc-dev 2016-06-09 07:46:17 +00:00
Lorenzo Colitti
1d75845bd5 Log the address of the IPv4 address that causes the test to fail.
Bug: 29231261
Change-Id: I6aac389d2c234091a284486422ee663119d021a9
2016-06-09 14:38:03 +09:00
Felipe Leme
b3f828552e Merge "Changed network check URL." into nyc-dev
am: 1791555ca8

* commit '1791555ca880db2aaa909d6f04f6cd082f21df0a':
  Changed network check URL.

Change-Id: I7722ad944c8d19a26412eb798f39dcfb74bc9dfe
2016-06-06 17:17:43 +00:00
Felipe Leme
1791555ca8 Merge "Changed network check URL." into nyc-dev 2016-06-06 17:09:36 +00:00
Felipe Leme
829443c140 Changed network check URL.
It cannot use google.com because it's blocked in some countries where
CTS tests are run.

BUG: 29082308

Change-Id: I749659ec2cd33248fddbe5b4ab02bd6e90f24a67
2016-06-06 16:05:57 +00:00
Felipe Leme
9f6d50289c Merge "Skip Doze Mode-related tests when device does not support it." into nyc-dev
am: 07924c0489

* commit '07924c0489b60f460b285eddc69533cbda51f5a9':
  Skip Doze Mode-related tests when device does not support it.

Change-Id: Ibbe3e77b88ffdcf7fe773aa18314661b59afca75
2016-06-02 21:43:46 +00:00
Felipe Leme
d1f3d68694 Skip Doze Mode-related tests when device does not support it.
Fixes: 29072117
Change-Id: I7ca37eae58258c021ed6297a9f1ee3b2749da7d7
2016-06-02 20:16:25 +00:00