diff options
| author | Kenny Root <kroot@google.com> | 2012-09-16 15:45:38 -0700 |
|---|---|---|
| committer | Kenny Root <kroot@google.com> | 2012-09-16 16:25:51 -0700 |
| commit | e15bdc2da4c74c8d16db8c1d067a42c4767d1003 (patch) | |
| tree | 14719082315788a36eaf7fe999fd56296238373c /core/tests/coretests/apks | |
| parent | 306df86302a96c7bf3d86aed81190c10ea6c2ccd (diff) | |
| download | frameworks_base-e15bdc2da4c74c8d16db8c1d067a42c4767d1003.zip frameworks_base-e15bdc2da4c74c8d16db8c1d067a42c4767d1003.tar.gz frameworks_base-e15bdc2da4c74c8d16db8c1d067a42c4767d1003.tar.bz2 | |
Add test for failed dexopt
Bug: 7010829
Change-Id: Ie0616ff2c3739ad73733857de6d04243b2be2fca
Diffstat (limited to 'core/tests/coretests/apks')
6 files changed, 66 insertions, 1 deletions
diff --git a/core/tests/coretests/apks/install_bad_dex/Android.mk b/core/tests/coretests/apks/install_bad_dex/Android.mk new file mode 100644 index 0000000..769a1b0 --- /dev/null +++ b/core/tests/coretests/apks/install_bad_dex/Android.mk @@ -0,0 +1,10 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_PACKAGE_NAME := install_bad_dex + +LOCAL_JAVA_RESOURCE_FILES := $(LOCAL_PATH)/classes.dex + +include $(FrameworkCoreTests_BUILD_PACKAGE) diff --git a/core/tests/coretests/apks/install_bad_dex/AndroidManifest.xml b/core/tests/coretests/apks/install_bad_dex/AndroidManifest.xml new file mode 100644 index 0000000..fe4dd8e --- /dev/null +++ b/core/tests/coretests/apks/install_bad_dex/AndroidManifest.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 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.frameworks.coretests.install_loc"> + + <application android:hasCode="true"> + <activity + android:name="com.android.frameworks.coretests.TestActivity"> + </activity> + </application> +</manifest> diff --git a/core/tests/coretests/apks/install_bad_dex/classes.dex b/core/tests/coretests/apks/install_bad_dex/classes.dex new file mode 100644 index 0000000..284b6d4 --- /dev/null +++ b/core/tests/coretests/apks/install_bad_dex/classes.dex @@ -0,0 +1 @@ +This is a bad dex diff --git a/core/tests/coretests/apks/install_bad_dex/res/values/strings.xml b/core/tests/coretests/apks/install_bad_dex/res/values/strings.xml new file mode 100644 index 0000000..3b8b3b1 --- /dev/null +++ b/core/tests/coretests/apks/install_bad_dex/res/values/strings.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- Just need this dummy file to have something to build. --> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="dummy">dummy</string> +</resources> diff --git a/core/tests/coretests/apks/install_bad_dex/src/com/android/frameworks/coretests/TestActivity.java b/core/tests/coretests/apks/install_bad_dex/src/com/android/frameworks/coretests/TestActivity.java new file mode 100644 index 0000000..10d0551 --- /dev/null +++ b/core/tests/coretests/apks/install_bad_dex/src/com/android/frameworks/coretests/TestActivity.java @@ -0,0 +1,24 @@ +/* + * 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. + * + */ + +package com.android.frameworks.coretests; + +import android.app.Activity; + +public class TestActivity extends Activity { + +} diff --git a/core/tests/coretests/apks/install_jni_lib/Android.mk b/core/tests/coretests/apks/install_jni_lib/Android.mk index de2993a..b61ea8e 100644 --- a/core/tests/coretests/apks/install_jni_lib/Android.mk +++ b/core/tests/coretests/apks/install_jni_lib/Android.mk @@ -23,6 +23,6 @@ LOCAL_SHARED_LIBRARIES := \ libnativehelper LOCAL_MODULE := libframeworks_coretests_jni -LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_TAGS := tests include $(BUILD_SHARED_LIBRARY) |
