From ec7e483c55a148490e35661ddb4fc5c1eb3b1a78 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Mon, 7 May 2012 23:14:59 -0700 Subject: Packages for PackageManagerService tests Change-Id: I3fd96abb0560fd8c596304d9c233e2f8f3fd8089 --- core/tests/coretests/apks/version/Android.mk | 36 +++++++++++++++++++ .../coretests/apks/version/AndroidManifest.xml | 28 +++++++++++++++ .../coretests/apks/version/res/values/strings.xml | 6 ++++ .../coretests/version_test/NullProvider.java | 39 +++++++++++++++++++++ core/tests/coretests/certs/README | 4 +++ core/tests/coretests/certs/unit_test.pk8 | Bin 0 -> 1217 bytes core/tests/coretests/certs/unit_test.x509.pem | 19 ++++++++++ core/tests/coretests/certs/unit_test_diff.pk8 | Bin 0 -> 1218 bytes core/tests/coretests/certs/unit_test_diff.x509.pem | 20 +++++++++++ 9 files changed, 152 insertions(+) create mode 100644 core/tests/coretests/apks/version/Android.mk create mode 100644 core/tests/coretests/apks/version/AndroidManifest.xml create mode 100644 core/tests/coretests/apks/version/res/values/strings.xml create mode 100644 core/tests/coretests/apks/version/src/com/android/frameworks/coretests/version_test/NullProvider.java create mode 100644 core/tests/coretests/certs/README create mode 100644 core/tests/coretests/certs/unit_test.pk8 create mode 100644 core/tests/coretests/certs/unit_test.x509.pem create mode 100644 core/tests/coretests/certs/unit_test_diff.pk8 create mode 100644 core/tests/coretests/certs/unit_test_diff.x509.pem diff --git a/core/tests/coretests/apks/version/Android.mk b/core/tests/coretests/apks/version/Android.mk new file mode 100644 index 0000000..3635a58 --- /dev/null +++ b/core/tests/coretests/apks/version/Android.mk @@ -0,0 +1,36 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_SRC_FILES := $(call all-subdir-java-files) +LOCAL_PACKAGE_NAME := version_1 +LOCAL_AAPT_FLAGS := --version-code 1 --version-name 1.0 +LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test +include $(FrameworkCoreTests_BUILD_PACKAGE) + +include $(CLEAR_VARS) +LOCAL_SRC_FILES := $(call all-subdir-java-files) +LOCAL_PACKAGE_NAME := version_2 +LOCAL_AAPT_FLAGS := --version-code 2 --version-name 2.0 +LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test +include $(FrameworkCoreTests_BUILD_PACKAGE) + +include $(CLEAR_VARS) +LOCAL_SRC_FILES := $(call all-subdir-java-files) +LOCAL_PACKAGE_NAME := version_3 +LOCAL_AAPT_FLAGS := --version-code 3 --version-name 3.0 +LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test +include $(FrameworkCoreTests_BUILD_PACKAGE) + +include $(CLEAR_VARS) +LOCAL_SRC_FILES := $(call all-subdir-java-files) +LOCAL_PACKAGE_NAME := version_1_diff +LOCAL_AAPT_FLAGS := --version-code 1 --version-name 1.0 +LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test_diff +include $(FrameworkCoreTests_BUILD_PACKAGE) + +include $(CLEAR_VARS) +LOCAL_SRC_FILES := $(call all-subdir-java-files) +LOCAL_PACKAGE_NAME := version_2_diff +LOCAL_AAPT_FLAGS := --version-code 2 --version-name 2.0 +LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test_diff +include $(FrameworkCoreTests_BUILD_PACKAGE) diff --git a/core/tests/coretests/apks/version/AndroidManifest.xml b/core/tests/coretests/apks/version/AndroidManifest.xml new file mode 100644 index 0000000..c35ae63 --- /dev/null +++ b/core/tests/coretests/apks/version/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + diff --git a/core/tests/coretests/apks/version/res/values/strings.xml b/core/tests/coretests/apks/version/res/values/strings.xml new file mode 100644 index 0000000..3b8b3b1 --- /dev/null +++ b/core/tests/coretests/apks/version/res/values/strings.xml @@ -0,0 +1,6 @@ + + + + + dummy + diff --git a/core/tests/coretests/apks/version/src/com/android/frameworks/coretests/version_test/NullProvider.java b/core/tests/coretests/apks/version/src/com/android/frameworks/coretests/version_test/NullProvider.java new file mode 100644 index 0000000..f5742f0 --- /dev/null +++ b/core/tests/coretests/apks/version/src/com/android/frameworks/coretests/version_test/NullProvider.java @@ -0,0 +1,39 @@ +package com.android.frameworks.coretests.version_test; + +import android.content.ContentProvider; +import android.content.ContentValues; +import android.database.Cursor; +import android.net.Uri; + +public class NullProvider extends ContentProvider { + @Override + public boolean onCreate() { + return true; + } + + @Override + public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, + String sortOrder) { + return null; + } + + @Override + public Uri insert(Uri uri, ContentValues values) { + return null; + } + + @Override + public int delete(Uri uri, String selection, String[] selectionArgs) { + return 0; + } + + @Override + public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { + return 0; + } + + @Override + public String getType(Uri uri) { + return "text/plain"; + } +} diff --git a/core/tests/coretests/certs/README b/core/tests/coretests/certs/README new file mode 100644 index 0000000..00917a1 --- /dev/null +++ b/core/tests/coretests/certs/README @@ -0,0 +1,4 @@ +Generate with: + +development/tools/make_key unit_test '/CN=unit_test' +development/tools/make_key unit_test_diff '/CN=unit_test_diff' diff --git a/core/tests/coretests/certs/unit_test.pk8 b/core/tests/coretests/certs/unit_test.pk8 new file mode 100644 index 0000000..f935e3e Binary files /dev/null and b/core/tests/coretests/certs/unit_test.pk8 differ diff --git a/core/tests/coretests/certs/unit_test.x509.pem b/core/tests/coretests/certs/unit_test.x509.pem new file mode 100644 index 0000000..21c4beb --- /dev/null +++ b/core/tests/coretests/certs/unit_test.x509.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAJnvhSUT7hwkMA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV +BAMUCXVuaXRfdGVzdDAeFw0xMjA1MDgwNTUwMDJaFw0zOTA5MjQwNTUwMDJaMBQx +EjAQBgNVBAMUCXVuaXRfdGVzdDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgC +ggEBAOm2mt+vcNjDqTx1SVMj0tQcAJU49zao6rKigV+D7QdLfVOYbzdlJjL7CVZQ +7+Tjq/mXHmNyUi7eI/eTgzZOXEjuf1moFoFvqxFeIHgR1iWAkODJ5FTGZEDiK4gY +amfS7LVwqsr1ExE6XfBUb5n/34V/Twr6suSRVjcS3OI5X3Yh/Ip/I2SNCJ6Kz5EX +RVk0T+I0zhIHX8+57Dp+0j3Cq0hb7ROylIbxrKzv1cpxt3FUrZXpLspalYvUoYLU +Jr3XA9vfbSf2NPqGz8VeUxvqoWcMhyMEuswwQF1YPU9HCIKhC76Xd8O5hIKy7jlo +ZNSiKmKySyy8IJB4w+Hxd70h6TMCAQOjdTBzMB0GA1UdDgQWBBSDs4X8MYwKBmiw +f+RqeLc8R8XaoTBEBgNVHSMEPTA7gBSDs4X8MYwKBmiwf+RqeLc8R8XaoaEYpBYw +FDESMBAGA1UEAxQJdW5pdF90ZXN0ggkAme+FJRPuHCQwDAYDVR0TBAUwAwEB/zAN +BgkqhkiG9w0BAQUFAAOCAQEAmRIybRohluR/zcrwRK5TpJIfArSNBdWLbfEyo+ug +mzMLq/RUHXXJSmqXaX/4tcW/LfjiCZjKmoauGSe9u979lX8nTKLBfeRWQpNUgwux +pBBt2Ein14IP7rZI34bB3iN06KTTBfpK60XZR23n9gkWClmMuTSd8scX/XoYXfeW +B0ePwQAMk1S1Ge5wbQCSJOCP5hTKzWio2S2rfw5pXa+ppHwXe0SWXtQHvMDu5WVy +Cgwqu4yxrneHYGV3mphtHXdtCAgfh4L+/4ooHwzBfxVaDhyZ1UvoEntczEi/VEV2 +liP8IbwSp1x8Mdg8TIVJrDjvAoR6j8ie8i3IHNRzZLNJ0A== +-----END CERTIFICATE----- diff --git a/core/tests/coretests/certs/unit_test_diff.pk8 b/core/tests/coretests/certs/unit_test_diff.pk8 new file mode 100644 index 0000000..a85ec86 Binary files /dev/null and b/core/tests/coretests/certs/unit_test_diff.pk8 differ diff --git a/core/tests/coretests/certs/unit_test_diff.x509.pem b/core/tests/coretests/certs/unit_test_diff.x509.pem new file mode 100644 index 0000000..e3e2197 --- /dev/null +++ b/core/tests/coretests/certs/unit_test_diff.x509.pem @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDLTCCAhWgAwIBAgIJAOZy2AGEfSxzMA0GCSqGSIb3DQEBBQUAMBkxFzAVBgNV +BAMUDnVuaXRfdGVzdF9kaWZmMB4XDTEyMDUwODE5MjYwN1oXDTM5MDkyNDE5MjYw +N1owGTEXMBUGA1UEAxQOdW5pdF90ZXN0X2RpZmYwggEgMA0GCSqGSIb3DQEBAQUA +A4IBDQAwggEIAoIBAQDKuDr+3vZZrjJ2AeTDFZJjeQdFrwRQJ1BOBM5aot/uTCfX +fe/CAm6Kn1rDtx+/srlLEqmjZDzzKYSpU7Vr0rOsTCTjWgis1/6jVydJgrsL6nXF +oz8swqTa+IYpa4gjs08EEqfjbbGTtSfVi6jziw/Nebtl5XRBoREpV8cTJk+DZH/B +8c0Ns8XpSawpFUDH9UXoEzNdje033HpTROWN7gbX9nA3x0YXdUnb8I0VcVf16m+3 +Tk07UkE/f7geOZ4CDF/a9dri9z5KWUlODOw7hlQG658N6gILmTc+5Vrree5eBLXo +qeIyg2w0pZZLLATomVCVUm9CaGna+cUai3Hfb+bFAgEDo3oweDAdBgNVHQ4EFgQU +xqP+zV47zj1Dsup1FU+PG1PBFZ4wSQYDVR0jBEIwQIAUxqP+zV47zj1Dsup1FU+P +G1PBFZ6hHaQbMBkxFzAVBgNVBAMUDnVuaXRfdGVzdF9kaWZmggkA5nLYAYR9LHMw +DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAg5rZis/BVK8EYhdr8F6p +yG7qYbHyYtswmGGu9MPcNKR9eclNd1VQktIEXoIqCq7DhHn0LWgedh4WHfCtbHmI +iPi9HUjMBzLiUUsuRloPPe1DykFZJY3EUYH9JI0p+J+18grGakrlPKqbF6ymVN9w +iaznMgf0qSpyIMFLgltLkiXPJUByTfADQBDsQe7njQlG4A+wSHTUN7XY32IIlQJ1 +lvmjBywZk4eJSv5qlefC2n/Zc4dl6jsiqhmx2aviO6fmuIsf4UprCRHlHOiNSmdL +M2ggtqpnzoOVSZlsXvYITmnsWNxiavz1DvIbnwglngmaqeaB/0qepdRKH1BJkW8q +9w== +-----END CERTIFICATE----- -- cgit v1.1