CTS Verifier Application Skeleton

Create a skeletal application for the CTS Verifier and tests
for the verifier itself. This is just a scaffold and
doesn't include any tests yet.

You should be be able to build the smoke tester and run the
tests for the verifier using:

runtest --path cts/apps/CtsVerifier

This should leave the smoke tester installed on your device.

Another way is build the app using "make cts"...

adb install -r out/target/product/generic/data/app/CtsVerifier.apk

Doing "make cts" will deposit the apk into the
repository/testcases directory. The app will be packaged as part
of the CTS zip bundle.

Change-Id: Ifd0080a444a0183736d064f68feb04ee49a4a1c6
diff --git a/CtsTestCaseList.mk b/CtsTestCaseList.mk
index 9a8ff91..fd719be 100644
--- a/CtsTestCaseList.mk
+++ b/CtsTestCaseList.mk
@@ -12,6 +12,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+CTS_APPS_LIST := \
+    CtsVerifier
+
 CTS_SECURITY_APPS_LIST := \
 	CtsAppAccessData \
 	CtsAppWithData \
@@ -63,4 +66,5 @@
 	CtsPerformance5TestCases \
 	ApiDemos \
 	ApiDemosReferenceTest \
+	$(CTS_APPS_LIST) \
 	$(CTS_SECURITY_APPS_LIST)
diff --git a/apps/Android.mk b/apps/Android.mk
new file mode 100644
index 0000000..4343259
--- /dev/null
+++ b/apps/Android.mk
@@ -0,0 +1,17 @@
+#
+# 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.
+#
+
+include $(call all-subdir-makefiles)
diff --git a/apps/CtsVerifier/Android.mk b/apps/CtsVerifier/Android.mk
new file mode 100644
index 0000000..7bc2249
--- /dev/null
+++ b/apps/CtsVerifier/Android.mk
@@ -0,0 +1,32 @@
+#
+# 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := CtsVerifier
+
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_PACKAGE)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
new file mode 100644
index 0000000..54611c3
--- /dev/null
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -0,0 +1,33 @@
+<?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.cts.verifier"
+      android:versionCode="1"
+      android:versionName="1.0">
+
+    <application android:label="@string/app_name">
+        <activity android:name=".CtsVerifierActivity"
+                  android:label="@string/app_name">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest> 
\ No newline at end of file
diff --git a/apps/CtsVerifier/res/layout/main.xml b/apps/CtsVerifier/res/layout/main.xml
new file mode 100644
index 0000000..c1fa365
--- /dev/null
+++ b/apps/CtsVerifier/res/layout/main.xml
@@ -0,0 +1,27 @@
+<?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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+    <TextView  
+        android:id="@+id/welcome"
+        android:layout_width="fill_parent" 
+        android:layout_height="wrap_content" 
+        android:text="@string/welcome_text"
+        />
+</LinearLayout>
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
new file mode 100644
index 0000000..5137dd1
--- /dev/null
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -0,0 +1,19 @@
+<?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.
+-->
+<resources>
+    <string name="app_name">CTS Verifier</string>
+    <string name="welcome_text">Welcome to the CTS Verifier!</string>
+</resources>
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/CtsVerifierActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/CtsVerifierActivity.java
new file mode 100644
index 0000000..f1b06d1
--- /dev/null
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/CtsVerifierActivity.java
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+
+package com.android.cts.verifier;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class CtsVerifierActivity extends Activity {
+
+    /** Called when the activity is first created. */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.main);
+    }
+}
diff --git a/apps/CtsVerifier/tests/Android.mk b/apps/CtsVerifier/tests/Android.mk
new file mode 100644
index 0000000..b9572fb
--- /dev/null
+++ b/apps/CtsVerifier/tests/Android.mk
@@ -0,0 +1,34 @@
+#
+# 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+
+LOCAL_JAVA_LIBRARIES := android.test.runner
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := CtsVerifierTests
+
+LOCAL_INSTRUMENTATION_FOR := CtsVerifier
+
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_PACKAGE)
diff --git a/apps/CtsVerifier/tests/AndroidManifest.xml b/apps/CtsVerifier/tests/AndroidManifest.xml
new file mode 100644
index 0000000..7b642d9
--- /dev/null
+++ b/apps/CtsVerifier/tests/AndroidManifest.xml
@@ -0,0 +1,29 @@
+<?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.cts.verifier.test"
+      android:versionCode="1"
+      android:versionName="1.0">
+    
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <instrumentation android:targetPackage="com.android.cts.verifier" android:name="android.test.InstrumentationTestRunner" />
+    
+</manifest> 
\ No newline at end of file
diff --git a/apps/CtsVerifier/tests/src/com/android/cts/verifier/CtsVerifierActivityTest.java b/apps/CtsVerifier/tests/src/com/android/cts/verifier/CtsVerifierActivityTest.java
new file mode 100644
index 0000000..8e45f7a
--- /dev/null
+++ b/apps/CtsVerifier/tests/src/com/android/cts/verifier/CtsVerifierActivityTest.java
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+package com.android.cts.verifier;
+
+import android.app.Activity;
+import android.test.ActivityInstrumentationTestCase2;
+import android.widget.TextView;
+
+public class CtsVerifierActivityTest
+        extends ActivityInstrumentationTestCase2<CtsVerifierActivity> {
+
+    private Activity mActivity;
+    private TextView mWelcomeTextView;
+    private String mWelcomeText;
+
+    public CtsVerifierActivityTest() {
+        super(CtsVerifierActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mActivity = getActivity();
+        mWelcomeTextView = (TextView) mActivity.findViewById(R.id.welcome);
+        mWelcomeText = mActivity.getString(R.string.welcome_text);
+    }
+
+    public void testPreconditions() {
+        assertNotNull(mWelcomeTextView);
+        assertNotNull(mWelcomeText);
+    }
+
+    public void testWelcome() {
+        assertEquals(mWelcomeText, mWelcomeTextView.getText().toString());
+    }
+}
diff --git a/development/ide/eclipse/.classpath b/development/ide/eclipse/.classpath
index 841158a..f20ab22 100644
--- a/development/ide/eclipse/.classpath
+++ b/development/ide/eclipse/.classpath
@@ -1,61 +1,63 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="cts/tests/ApiDemosReferenceTest/src"/>
-	<classpathentry kind="src" path="cts/tests/ProcessTest/src"/>
-	<classpathentry kind="src" path="cts/tests/ProcessTest/NoShareUidApp/src"/>
-	<classpathentry kind="src" path="cts/tests/ProcessTest/ShareUidApp/src"/>
-	<classpathentry kind="src" path="cts/tests/SignatureTest/src"/>
-	<classpathentry kind="src" path="cts/tests/SignatureTest/tests/src"/>
-	<classpathentry kind="src" path="cts/tests/accessibilityservice/src"/>
-	<classpathentry kind="src" path="cts/tests/appsecurity-tests/src"/>
-	<classpathentry kind="src" path="cts/tests/core/runner/src"/>
-	<classpathentry kind="src" path="cts/tests/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/accessibilityservice/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/accounts/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/app/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/bluetooth/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/content/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/database/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/dpi/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/dpi2/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/example/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/gesture/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/graphics/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/hardware/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/jni/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/location/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/media/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/net/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/os/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/performance/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/performance2/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/performance3/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/performance4/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/performance5/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/permission/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/permission2/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/provider/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/speech/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/telephony/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/text/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/util/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/view/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/webkit/src"/>
-	<classpathentry kind="src" path="cts/tests/tests/widget/src"/>
-        <classpathentry kind="src" path="cts/tools/annotation-helper/src"/>
-	<classpathentry kind="src" path="cts/tools/cts-reference-app-lib/src"/>
-	<classpathentry kind="src" path="cts/tools/dasm/src"/>
-        <classpathentry kind="src" path="cts/tools/device-setup/TestDeviceSetup/src"/>
-	<classpathentry kind="src" path="cts/tools/dex-tools/src"/>
-	<classpathentry kind="src" path="cts/tools/dx-tests/src"/>
-	<classpathentry kind="src" path="cts/tools/host/src"/>
-	<classpathentry kind="src" path="cts/tools/host/test"/>
-        <classpathentry kind="src" path="cts/tools/signature-tools/src"/>
-        <classpathentry kind="src" path="cts/tools/signature-tools/test"/>
-        <classpathentry kind="src" path="cts/tools/spec-progress/src"/>
-        <classpathentry kind="src" path="cts/tools/test-progress-new/src"/>
-        <classpathentry kind="src" path="cts/tools/utils"/>
-        <classpathentry kind="src" path="cts/tools/vm-tests/src"/>
-        <classpathentry kind="src" path="out/target/common/obj/APPS/CtsTestStubs_intermediates/src/src"/>
-        <classpathentry kind="src" path="out/target/common/obj/APPS/CtsAccessibilityServiceTestCases_intermediates/src/src"/>
+    <classpathentry kind="src" path="cts/apps/CtsVerifier/src"/>
+    <classpathentry kind="src" path="cts/apps/CtsVerifier/tests/src"/>
+    <classpathentry kind="src" path="cts/tests/ApiDemosReferenceTest/src"/>
+    <classpathentry kind="src" path="cts/tests/ProcessTest/src"/>
+    <classpathentry kind="src" path="cts/tests/ProcessTest/NoShareUidApp/src"/>
+    <classpathentry kind="src" path="cts/tests/ProcessTest/ShareUidApp/src"/>
+    <classpathentry kind="src" path="cts/tests/SignatureTest/src"/>
+    <classpathentry kind="src" path="cts/tests/SignatureTest/tests/src"/>
+    <classpathentry kind="src" path="cts/tests/accessibilityservice/src"/>
+    <classpathentry kind="src" path="cts/tests/appsecurity-tests/src"/>
+    <classpathentry kind="src" path="cts/tests/core/runner/src"/>
+    <classpathentry kind="src" path="cts/tests/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/accessibilityservice/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/accounts/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/app/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/bluetooth/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/content/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/database/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/dpi/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/dpi2/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/example/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/gesture/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/graphics/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/hardware/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/jni/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/location/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/media/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/net/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/os/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/performance/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/performance2/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/performance3/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/performance4/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/performance5/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/permission/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/permission2/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/provider/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/speech/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/telephony/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/text/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/util/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/view/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/webkit/src"/>
+    <classpathentry kind="src" path="cts/tests/tests/widget/src"/>
+    <classpathentry kind="src" path="cts/tools/annotation-helper/src"/>
+    <classpathentry kind="src" path="cts/tools/cts-reference-app-lib/src"/>
+    <classpathentry kind="src" path="cts/tools/dasm/src"/>
+    <classpathentry kind="src" path="cts/tools/device-setup/TestDeviceSetup/src"/>
+    <classpathentry kind="src" path="cts/tools/dex-tools/src"/>
+    <classpathentry kind="src" path="cts/tools/dx-tests/src"/>
+    <classpathentry kind="src" path="cts/tools/host/src"/>
+    <classpathentry kind="src" path="cts/tools/host/test"/>
+    <classpathentry kind="src" path="cts/tools/signature-tools/src"/>
+    <classpathentry kind="src" path="cts/tools/signature-tools/test"/>
+    <classpathentry kind="src" path="cts/tools/spec-progress/src"/>
+    <classpathentry kind="src" path="cts/tools/test-progress-new/src"/>
+    <classpathentry kind="src" path="cts/tools/utils"/>
+    <classpathentry kind="src" path="cts/tools/vm-tests/src"/>
+    <classpathentry kind="src" path="out/target/common/obj/APPS/CtsTestStubs_intermediates/src/src"/>
+    <classpathentry kind="src" path="out/target/common/obj/APPS/CtsAccessibilityServiceTestCases_intermediates/src/src"/>
 </classpath>