am 3b842a86: keep history after reset to master-nova-dev
* commit '3b842a8628da809286b810b6881e382890ead1f6':
This commit is contained in:
@@ -417,5 +417,7 @@ ${OUT_DIR}/target/common/obj/PACKAGING/android-support-v17-leanback_intermediate
|
|||||||
# Tests Component
|
# Tests Component
|
||||||
##############################################################################
|
##############################################################################
|
||||||
framework/layoutlib-tests.jar tests/libtests/layoutlib-tests.jar
|
framework/layoutlib-tests.jar tests/libtests/layoutlib-tests.jar
|
||||||
system/app/EmulatorSmokeTests.apk tests/emulator-test-apps/EmulatorSmokeTests.apk
|
system/app/ConnectivityTest.apk tests/emulator-test-apps/ConnectivityTest.apk
|
||||||
|
system/app/GpsLocationTest.apk tests/emulator-test-apps/GpsLocationTest.apk
|
||||||
|
system/app/SmsTest.apk tests/emulator-test-apps/SmsTest.apk
|
||||||
|
|
||||||
|
|||||||
32
tools/emulator/test-apps/ConnectivityTest/Android.mk
Normal file
32
tools/emulator/test-apps/ConnectivityTest/Android.mk
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Copyright (C) 2011 The Android Open Source Project
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
LOCAL_PATH:= $(call my-dir)
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
|
||||||
|
# Only compile source java files in this apk.
|
||||||
|
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||||
|
|
||||||
|
LOCAL_PACKAGE_NAME := ConnectivityTest
|
||||||
|
|
||||||
|
LOCAL_SDK_VERSION := 4
|
||||||
|
|
||||||
|
LOCAL_PROGUARD_ENABLED := disabled
|
||||||
|
|
||||||
|
include $(BUILD_PACKAGE)
|
||||||
|
|
||||||
|
# Use the following include to make our test apk.
|
||||||
|
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2011 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.android.emulator.connectivity.test"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0">
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-sdk android:minSdkVersion="4" />
|
||||||
|
<instrumentation android:targetPackage="com.android.emulator.connectivity.test" android:name="android.test.InstrumentationTestRunner" />
|
||||||
|
<application android:label="Connectivity Test">
|
||||||
|
<uses-library android:name="android.test.runner" />
|
||||||
|
</application>
|
||||||
|
</manifest>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.android.emulator.smoketests.connectivity;
|
package com.android.emulator.connectivity.test;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
32
tools/emulator/test-apps/GpsLocationTest/Android.mk
Normal file
32
tools/emulator/test-apps/GpsLocationTest/Android.mk
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Copyright (C) 2011 The Android Open Source Project
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
LOCAL_PATH:= $(call my-dir)
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
|
||||||
|
# Only compile source java files in this apk.
|
||||||
|
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||||
|
|
||||||
|
LOCAL_PACKAGE_NAME := GpsLocationTest
|
||||||
|
|
||||||
|
LOCAL_SDK_VERSION := 4
|
||||||
|
|
||||||
|
LOCAL_PROGUARD_ENABLED := disabled
|
||||||
|
|
||||||
|
include $(BUILD_PACKAGE)
|
||||||
|
|
||||||
|
# Use the following include to make our test apk.
|
||||||
|
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||||
27
tools/emulator/test-apps/GpsLocationTest/AndroidManifest.xml
Normal file
27
tools/emulator/test-apps/GpsLocationTest/AndroidManifest.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2011 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.android.emulator.gps.test"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0">
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
|
<uses-sdk android:minSdkVersion="4" />
|
||||||
|
<instrumentation android:targetPackage="com.android.emulator.gps.test"
|
||||||
|
android:name="android.test.InstrumentationTestRunner" />
|
||||||
|
<application android:label="GPS Location Test">
|
||||||
|
<uses-library android:name="android.test.runner" />
|
||||||
|
</application>
|
||||||
|
</manifest>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.android.emulator.smoketests.gps;
|
package com.android.emulator.gps.test;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
@@ -22,7 +22,7 @@ LOCAL_MODULE_TAGS := optional
|
|||||||
# Only compile source java files in this apk.
|
# Only compile source java files in this apk.
|
||||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := EmulatorSmokeTests
|
LOCAL_PACKAGE_NAME := SmsTest
|
||||||
|
|
||||||
LOCAL_SDK_VERSION := 4
|
LOCAL_SDK_VERSION := 4
|
||||||
|
|
||||||
@@ -14,14 +14,11 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.android.emulator.smoketests">
|
package="com.android.emulator.sms.test">
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
<uses-permission android:name="android.permission.READ_SMS" />
|
<uses-permission android:name="android.permission.READ_SMS" />
|
||||||
<uses-sdk android:minSdkVersion="4" />
|
<uses-sdk android:minSdkVersion="4" />
|
||||||
<instrumentation android:targetPackage="com.android.emulator.smoketests"
|
<instrumentation android:targetPackage="com.android.emulator.sms.test"
|
||||||
android:name="android.support.test.runner.AndroidJUnitRunner" />
|
android:name="android.support.test.runner.AndroidJUnitRunner" />
|
||||||
<application android:label="Emulator Smoke Tests">
|
<application android:label="Sms Test">
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.android.emulator.smoketests.sms;
|
package com.android.emulator.sms.test;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
@@ -52,10 +52,8 @@ public class SmsTest {
|
|||||||
public void testReceivedSms() throws java.lang.InterruptedException {
|
public void testReceivedSms() throws java.lang.InterruptedException {
|
||||||
Cursor c = getSmsCursor();
|
Cursor c = getSmsCursor();
|
||||||
c.moveToFirst();
|
c.moveToFirst();
|
||||||
|
|
||||||
String number = c.getString(c.getColumnIndexOrThrow("address"));
|
String number = c.getString(c.getColumnIndexOrThrow("address"));
|
||||||
String body = c.getString(c.getColumnIndexOrThrow("body"));
|
String body = c.getString(c.getColumnIndexOrThrow("body"));
|
||||||
|
|
||||||
c.close();
|
c.close();
|
||||||
|
|
||||||
assertEquals(NUMBER, number);
|
assertEquals(NUMBER, number);
|
||||||
Reference in New Issue
Block a user