Commit Graph

190 Commits

Author SHA1 Message Date
Irfan Sheriff
c0e2e5715b Fix NPE in CTS test
wifiConfigurations returned by getConfiguredNetworks() can be null.
It is only incidental that this test passed fine in the past.

Bug: 6822950
Change-Id: I570ab6e7fd6cc5eb150914a5d7ca527ccc2f16cd
2012-07-23 10:19:34 -07:00
Keun young Park
30199405c3 change testRunner to CtsTestRunner
- unlock keyguard by default

Change-Id: I0452a72cfa54edfa79b485894ffd0493a71122ee
2012-07-12 12:57:30 -07:00
Brian Muramatsu
a4170d951a Merge "Fix WifiInfoTest flakiness" into jb-dev 2012-06-27 12:56:05 -07:00
Irfan Sheriff
f7e73fcc35 Add wifi & p2p Concurrency test
Change-Id: I5a35fb097b22b00366b189bad9c44a640a7d5b5a
2012-06-26 16:54:35 -07:00
Brian Muramatsu
237e076594 Fix WifiInfoTest flakiness
Poll a bit longer waiting for getNetworkId and getWifiState to return
the proper values. The bug reports seem to indicate that the WiFi
is shutting down properly.

Add a new static check method to PollingCheck that I think is simpler
than the existing way of creating a new PollingCheck, overriding
check, and then making sure to call run. This new variation also allows
you to specify a message rather than just "unexpected timeout."

Bug 6443337

Change-Id: I9f7c942f6e26b957bb717b58b1ab984acc556bf7
2012-06-26 15:05:08 -07:00
Brian Muramatsu
28ca76b84d Flip condition in ApacheHttpClientTest
Make sure to wait first and then check the expected state rather than
check the expected state first and then waiting.

Bug 6293413

Change-Id: Ibcb1127b935708c51fafdc8624cb3a7eefc01bda
2012-06-08 16:45:02 -07:00
Jesse Wilson
fb1b2d0923 Track rename of Uri.normalize() to Uri.normalizeScheme().
Change-Id: I0b6c65e033bfb82503f30e5c9e55903278c4a788
2012-05-10 14:32:37 -04:00
Brian Muramatsu
7dde0466ab Fix NetworkInfo_DetailedStateTest
Bug 6292661

Test is missing a new enum value.

Change-Id: I0f5983575eb7aeb87b212e44c5476025a4baf609
2012-04-04 18:22:15 -07:00
Chia-chi Yeh
6bda9056ef Add CTS test for android.net.rtp.
Bug: 5975113
Change-Id: I20ec3b172a2d6501048418f4c3da06d1b7144fd3
2012-03-30 14:20:25 -07:00
Brian Muramatsu
248128f2a9 Static Libs for Popular CTS Stub Components
com.android.cts.stub is growing very large. Split apart some of
the popular components into separate static libraries. This
should allow packages to depend on the components they need
rather than all of cts.stub.

Current code at the moment doesn't have to be changed, because
I have CtsTestStubs depending on these new shared libraries.
However, change the net package to depend on the ctstestserver
static library as a proof of concept rather than including
its source directly.

Change-Id: I32c54eab3ddfb1d4391d6ffc347fbc9cb2fe97f9
2012-03-05 18:46:33 -08:00
Chia-chi Yeh
5db6b9ccd9 am 2b080081: am 0ba8011d: am 66efc9c3: Add CTS test for android.net.VpnService.
* commit '2b080081211979d0b631d998b3a112359c5b7ed1':
  Add CTS test for android.net.VpnService.
2012-02-28 17:56:25 -08:00
Chia-chi Yeh
66efc9c3c0 Add CTS test for android.net.VpnService.
Bug: 5910784
Change-Id: Icb3d874d4d0917f739bd2638596f28df2a7d206e
2012-02-28 17:45:26 -08:00
Chia-chi Yeh
e4791afe6c am b57076f9: am edd2f178: am 4231515a: Free net.cts from cts.stub.
* commit 'b57076f9137e2acd6fb9145b8f8be26f43d91cdb':
  Free net.cts from cts.stub.
2012-02-28 15:40:30 -08:00
Chia-chi Yeh
4231515a1b Free net.cts from cts.stub.
Explicitly include CtsTestServer in Android.mk to eliminate the
dependency to cts.stub. This allows net.cts to instrument itself,
and it also allows network-specific JNI code to be added in the
same package.

Change-Id: I624f87e0112619c5b97f2c3589933f666665fa8e
2012-02-28 14:58:23 -08:00
Keun young Park
874d50fc8a am 5ca3810a: am 86c57f70: am 3e1d8ebc: Merge "skip WiFi test if not supproted - Support info is coming from PackageManager Bug: 5547397" into ics-mr1
* commit '5ca3810a38a9daa55b3d150679b089721af80b60':
  skip WiFi test if not supproted - Support info is coming from PackageManager Bug: 5547397
2012-02-14 12:44:04 -08:00
Keun young Park
a36a66a542 skip WiFi test if not supproted
- Support info is coming from PackageManager
Bug: 5547397

Change-Id: I35d0ac82fe31a436d38d0436d32c0bb194eba3a6
2012-02-14 09:27:14 -08:00
Brian Muramatsu
08acbf9245 Remove Test Annotations
These annotations are not being parsed by any program.
Also they are distracting to readers and are painful to
maintain. Furthermore, they prevent us from adding the
LOCAL_SDK_CURRENT clause to Makefiles which is useful
to detect and stop us from using private APIs.

Change-Id: Id93b3a80c73df808c342e489f1434261f288204c
2012-01-26 16:44:21 -08:00
Nick Pelly
beb5a527e3 CTS tests for Intent.normalize...() API's
Change-Id: I5b21028dd29f5bd1565c2ca2f65636ca9aa901d0
2012-01-24 20:04:55 -08:00
Brian Muramatsu
59be169eb9 Move Test XML Generation from buildCts.py
buildCts.py was the central script that generated all the
test package XMLs each time CTS was built. This had a
couple problems:

1. All the XML files for ~40 packages needed to be made
   every time CTS was made. Even if those packages were
   not touched at all.

2. Couldn't shard the XML generation process across the
   available cores on a machine. A pool was added to the
   python script, but it was set to a fixed number.

This change moves the test XML generation into a
smaller Java program called "cts-java-scanner" and
the doclet it relies upon to scan the Java files
into "cts-java-scanner-doclet.jar". The output of
the scanner like "cts-native-scanner" for native EXEs
is piped to the existing cts-xml-generator to
produce the test XMLs.

New CTS specific rules replace the standard
BUILD_PACKAGE and BUILD_HOST_JAVA_LIBRARY. They just
add extra rules for the package XML. The BUILD_CTS_PACKAGE
rule also adds a rule for copying the "package.apk"
to something more like "CtsFooTestCases.apk" to the
test case out directory. All the apks, exes, and xmls
are now thrown into a "cts-testcases" directory, before
they are copied to the final CTS distribution.

This change should prevent rebuilding the XMLs
unnecessarily and make rebuilding CTS quicker while
writing tests.

There are still the libcore tests that are always rebuilt,
but they can be adapted to fit into this model someday...

Change-Id: I52a916aa37fd679057e2709bb0ccec694c9fca01
2012-01-05 11:43:00 -08:00
Brian Muramatsu
46c9ffe1ea am dc37b725: (-s ours) am 395cb95d: resolved conflicts for merge of 309f8b3f to ics-mr1
* commit 'dc37b7251c8edd3e73797c4d0e3acb6df192fb59':
  DO NOT MERGE Update CTS Version to 2.3_r10
  Add SKT/KT rule into CtsTelephonyTestCases and use MCC+MNC code to distinguish SKT or KT carriers.
  Fix AudioRecordTest to skip setUp() and tearDown() when MIC is not available.
  fix IPv6 loopback pattern
  Update the list UNSUPPORT_DATA_SMS_MESSAGES
  Adjust the value of individualStartTimeoutMs to be consistent with the value of testStatusTimeoutMs.
  Revert "Changed CTS runner to work with emulator"
  Disable CTS Verifier BT Connection Access Tests
  Fix Test Blacklist Mistake for HC MR2
  Update CTS Verifier Version to 3.1 R2
  Update CTS Version to 3.1 R5
2011-11-18 15:22:39 -08:00
Brian Muramatsu
395cb95d6f resolved conflicts for merge of 309f8b3f to ics-mr1
Change-Id: I12a9563ab4e3d2119f7fd6ca8a2921c7baab8d4c
2011-11-18 11:30:54 -08:00
Brian Muramatsu
309f8b3fb5 Merge remote branch 'goog/honeycomb-mr2' into ics-mr0
Conflicts:
	apps/CtsVerifier/AndroidManifest.xml
	tests/expectations/knownfailures.txt

Change-Id: I1b918333883e0f3d651e9f4d65918974eaa3b72f
2011-11-17 17:21:23 -08:00
Brian Muramatsu
f021575916 Merge remote branch 'goog/honeycomb-mr1' into honeycomb-mr2 2011-11-17 16:51:08 -08:00
Brian Muramatsu
5e1dd100c8 Merge remote branch 'goog/honeycomb' into honeycomb-mr1 2011-11-17 15:09:45 -08:00
Brian Muramatsu
4141ef9430 Merge remote branch 'goog/gingerbread' into honeycomb
Conflicts:
	apps/CtsVerifier/AndroidManifest.xml
	tests/tests/telephony/src/android/telephony/cts/SmsMessageTest.java
	tools/host/src/com/android/cts/Version.java

Change-Id: Ie15a3eb7f002a300469f17e3f906856c07061223
2011-11-17 14:20:50 -08:00
Nick Kralevich
fff8fb1b9f Move file, change loopback handling, docs.
Move the ListeningPortsTest from android.net.cts to android.security.cts,
to better indicate that this is a security related test.

Start triggering test failures when a process is bound to the loopback
interface. In those cases, it's always better to use a UNIX domain
socket instead of a locally bound IP socket. UNIX domain sockets
can be protected with unix filesystem permissions, or
getsockopt(SO_PEERCRED) can be used to indicate who is on the
other end of the socket.

Drastically fix the documentation to explain why this test is present.

Modify the IP addresses and port numbers to be more human readable.

Change-Id: Id83aadd1455279a1a2d3fb4fb1915af558355aca
2011-11-02 14:42:03 -07:00
Brett Chabot
c4f14d8f8f am cb8b1d95: Merge "Only install necessary prequisite apks." into ics-mr0
* commit 'cb8b1d9566e122812b7da9346254bb97eb06bc40':
  Only install necessary prequisite apks.
  Execute remaining tests in order.
  fix IPv6 loopback pattern
  DO NOT MERGE Adjust test start date
  Retain META-INF in core-tests.
  Fix a mismatch problem because of hidden public API in CamcorderProfile.java
  Update CTS Verifier Feature Summary
2011-10-26 12:22:36 +00:00
Nick Kralevich
52cc91ff45 fix IPv6 loopback pattern
In /proc/net/udp6 and /proc/net/tcp6, the addresses stored
in that file are in network byte order.  As a result, the IPv6
loopback address, ::1, is stored as
00000000000000000000000001000000 NOT
00000000000000000000000000000001

Bug: 5473686
Change-Id: I73098d52c981c48d82423c8ce99b6b20d11a5568
2011-10-25 20:35:52 +00:00
Nick Kralevich
3dc050e0eb fix IPv6 loopback pattern
In /proc/net/udp6 and /proc/net/tcp6, the addresses stored
in that file are in network byte order.  As a result, the IPv6
loopback address, ::1, is stored as
00000000000000000000000001000000 NOT
00000000000000000000000000000001

Bug: 5473686
Change-Id: I73098d52c981c48d82423c8ce99b6b20d11a5568
2011-10-25 11:27:24 -07:00
Nick Kralevich
531debc280 fix IPv6 loopback pattern
In /proc/net/udp6 and /proc/net/tcp6, the addresses stored
in that file are in network byte order.  As a result, the IPv6
loopback address, ::1, is stored as
00000000000000000000000001000000 NOT
00000000000000000000000000000001

Bug: 5473686
Change-Id: I73098d52c981c48d82423c8ce99b6b20d11a5568
2011-10-25 10:20:42 -07:00
android-htc-contribute
56f62ef149 am e54f4889: am bb1ababe: am 0c292bb1: Data call establish time is related to network condition which can’t be controlled by the device. Extend the time limitation to 30 seconds to cover most of the cases.
* commit 'e54f4889f65df9955e22a8adbbb8c1527220103e':
  Data call establish time is related to network condition which can’t be controlled by the device. Extend the time limitation to 30 seconds to cover most of the cases.
2011-10-10 12:42:58 -07:00
android-htc-contribute
e54f4889f6 am bb1ababe: am 0c292bb1: Data call establish time is related to network condition which can’t be controlled by the device. Extend the time limitation to 30 seconds to cover most of the cases.
* commit 'bb1ababef8fd8f0ba3e671b426ccc0d26f115ff7':
  Data call establish time is related to network condition which can’t be controlled by the device. Extend the time limitation to 30 seconds to cover most of the cases.
2011-10-10 12:41:03 -07:00
android-htc-contribute
0c292bb117 Data call establish time is related to network condition which can’t be controlled by the device.
Extend the time limitation to 30 seconds to cover most of the cases.

Change-Id: I522f7eb23baa9a652fb3fd633d200cd6307180c8
2011-10-10 12:27:36 -07:00
Brian Muramatsu
0bcdf4ac97 Merge remote branch 'goog/honeycomb-mr1' into honeycomb-mr2
Conflicts:
	apps/CtsVerifier/AndroidManifest.xml
	tools/host/src/com/android/cts/Version.java

Change-Id: I5e9642c74dd3381865e731567e7decebb9ab2b71
2011-10-07 11:55:14 -07:00
Brian Muramatsu
93ca5b572b Merge remote branch 'goog/honeycomb' into honeycomb-mr1 2011-10-07 11:30:17 -07:00
Brian Muramatsu
6eb7128c9c Merge remote branch 'goog/gingerbread' into honeycomb
Conflicts:
	apps/CtsVerifier/AndroidManifest.xml
	tests/tests/app/src/android/app/cts/DownloadManagerTest.java

Change-Id: I16c2d14484dea54d89c3ccb105e2dfacace1f9e1
2011-10-07 11:14:08 -07:00
Steve Block
ed5e67c5fd Merge "Add tests for SslError" 2011-10-06 09:18:06 -07:00
Steve Block
19ad949076 Add tests for SslError
Bug: 5416594
Change-Id: Iebbc9d02088ea986246a8c7e9d4f9b2b84dd8116
2011-10-05 22:53:41 +01:00
Nick Kralevich
9f937dbff7 am 77d823cf: am 739152d2: am 8670b1c2: ListeningPortsTest: Make error message more useful.
* commit '77d823cf78174f7c9d373303b4aa821ba1d24b44':
  ListeningPortsTest: Make error message more useful.
2011-10-05 10:54:09 -07:00
Nick Kralevich
77d823cf78 am 739152d2: am 8670b1c2: ListeningPortsTest: Make error message more useful.
* commit '739152d27899821227e7cc07670d1f47a9a4e39d':
  ListeningPortsTest: Make error message more useful.
2011-10-05 10:51:21 -07:00
Nick Kralevich
8670b1c23f ListeningPortsTest: Make error message more useful.
- Add UID of listener to error message.
- Convert hex port number to decimal for easier reading by humans.

Change-Id: I0b8edcf14ebd0c039b936055a265f4706558f9fe
2011-10-05 10:43:01 -07:00
Brian Muramatsu
a3b6f08cf8 Merge remote branch 'goog/honeycomb-mr2'
Conflicts:
	apps/CtsVerifier/AndroidManifest.xml
	apps/CtsVerifier/res/values/strings.xml
	apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java
	tests/core/runner/src/android/test/InstrumentationCtsTestRunner.java
	tests/expectations/knownfailures-3.0_r1.txt
	tests/expectations/knownfailures.txt
	tests/tests/app/src/android/app/cts/ActivityManagerMemoryClassTest.java
	tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java
	tests/tests/os/src/android/os/cts/BuildVersionTest.java
	tools/host/src/com/android/cts/Version.java

Change-Id: If9da4508f8eee25351538e3118e6ae990be49c60
2011-08-30 17:56:00 -07:00
Brian Muramatsu
68f66bffff Fix for ConnectivityManagerTest
Bug 5178134

Some network types can throw SecurityExceptions and depend on the
build configuration. Don't fail the test if those throw exceptions.

Change-Id: I5365f85280a348ef1777d05ce50b2dff17a1312f
2011-08-17 16:14:29 -07:00
Brian Muramatsu
2f9310c000 resolved conflicts for merge of b5d1b8d9 to master
Change-Id: I27437b34ee8792334b18f3d888092b28b16c0b33
2011-07-11 16:51:59 -07:00
Brian Muramatsu
b5d1b8d9c0 am 21bfd26f: am 111f5e92: Merge remote branch \'goog/honeycomb-mr1\' into manualmerge
* commit '21bfd26fd69ac180ae35bf727dc8500fc56289ea':
  Add test to ensure data/drm directory exists for drm process to write the certificate files. For bug 4950503.
  Update Test Expectations for HC
  Fix DeviceAdminReceiverTest NPE
  Add a header for string.h for strerror and memset
  Fix Screen Lock Test for HC
  Update CTS Version to 3.0_r3
  Fix webkit flakiness when waiting for results
  Increase HDPI/XHDPI Non-XLarge Min Memory to 32
  Use Uri.encode with HTML that contains special characters
  Fix view tests to account for alternate actionbars
  Bug fix for b/4491376 CTS failure in CtsAccessibilityServiceTestCases. Changed to holo.notitle theme and test code.
  Add a case for density 213, which is used for some tv devices. The memory requirements are set to be the same as high and xhigh dpi
  Fixes AudioRecorderTest and MediaRecorderTest when there are no mics or cameras present
2011-07-08 11:48:10 -07:00
Brian Muramatsu
1fb779d832 Merge remote branch 'goog/honeycomb' into manualmerge
Conflicts:
	tools/host/src/com/android/cts/Version.java

Change-Id: I059dc4b100504988ab3b1ccbd0a0bd61c1b05787
2011-06-29 18:13:57 -07:00
Brian Muramatsu
b8ddbd082a Merge remote branch 'goog/gingerbread' into manualmerge 2011-06-29 15:58:54 -07:00
Brian Muramatsu
e5ed9f7d8a am b44dd720: am 952fb86a: am c2e543dc: Merge "Test for Apache HttpClient" into gingerbread
* commit 'b44dd720f7289c67ff31b15fae4f1dace30f03c6':
  Test for Apache HttpClient
2011-06-27 14:43:47 -07:00
Brian Muramatsu
b44dd720f7 am 952fb86a: am c2e543dc: Merge "Test for Apache HttpClient" into gingerbread
* commit '952fb86af1e1cb4714ee3aa03fa5b36a6ad204d4':
  Test for Apache HttpClient
2011-06-27 14:37:15 -07:00
Brian Muramatsu
a18b717579 Test for Apache HttpClient
Bug 4554251

This test launches multiple downloads at once to check that the
device can open up multiple sockets without OOMing. One test
tries to use wifi if available and the other tries to use
mobile by disconnecting wifi.

The CtsTestServer was modified to handle responses in separate
threads to test concurrent downloads.

Change-Id: Ifa1a11f409c69c1ae3ce621bf0542e0be56b50e0
2011-06-22 18:18:26 -07:00