AOSP/Email -Added TEST_MAPPING file and "LOCAL_COMPATIBILITY_SUITE := device-tests" to enable presubmit tests for Email.

Bug: 127848297

Test: manual - Ran the following tests on Pixel phone. Tested the email UI.

$ make -j 40
$ make EmailTests -j

$ find out -name "Email*apk" -print -exec ls -l {} \;
  out/target/product/marlin/testcases/EmailTests/arm64/EmailTests.apk
    -rw-r--r-- 1 rtenneti primarygroup 397791 Jul  2 11:24 out/target/product/marlin/testcases/EmailTests/arm64/EmailTests.apk

  out/target/product/marlin/testcases/Email/arm64/Email.apk
    -rw-r--r-- 1 rtenneti primarygroup 6367434 Jul  1 13:15 out/target/product/marlin/testcases/Email/arm64/Email.apk

$ adb install -r out/target/product/marlin/testcases/Email/arm64/Email.apk
$ adb install -r out/target/product/marlin/testcases/EmailTests/arm64/EmailTests.apk

$ adb shell am instrument -w com.android.email.tests
  Time: 34.632
  OK (157 tests)

$ atest EmailTests
  ...
  [100% 10/10] Copy: out/target/product/marlin/testcases/EmailTests/arm64/EmailTests.apk
  2019-07-02 11:29:03 atest_utils.py:164:INFO: Build successful

  Running Tests...

  EmailTests (157 Tests)
  ---------------------
  [1/157] com.android.email.DummyFlakyTest#imNotReallyFlaky: PASSED (1ms)
  ...
  [157/157] com.android.emailcommon.utility.UtilityTest#testParseEmailDateTime: PASSED (0ms)

  Summary
  -------
  EmailTests: Passed: 157, Failed: 0, Ignored: 0, Assumption Failed: 0

  All tests passed!

Change-Id: I5bacfbf4178d3859a3f6541c45fad52111385268
diff --git a/Android.mk b/Android.mk
index f574c16..b04fc97 100644
--- a/Android.mk
+++ b/Android.mk
@@ -72,6 +72,8 @@
 
 LOCAL_SDK_VERSION := current
 
+LOCAL_COMPATIBILITY_SUITE := general-tests
+
 include $(BUILD_PACKAGE)
 
 # additionally, build unit tests in a separate .apk
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..9d32044
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,7 @@
+{
+  "presubmit": [
+    {
+      "name": "EmailTests"
+    }
+  ]
+}
diff --git a/tests/Android.mk b/tests/Android.mk
index d5e9d96..60105f0 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -31,6 +31,7 @@
 # stay at 1.6 as long as LOCAL_SDK_VERSION is set to a value < 19. See http://b/38495704
 LOCAL_JAVA_LANGUAGE_VERSION := 1.6
 LOCAL_SDK_VERSION := 14
+LOCAL_COMPATIBILITY_SUITE := general-tests
 LOCAL_PACKAGE_NAME := EmailTests
 LOCAL_INSTRUMENTATION_FOR := Email
 
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index b5e087c..81cb67e 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -4,9 +4,9 @@
      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.
@@ -20,7 +20,7 @@
 
     <!-- We add an application tag here just so that we can indicate that
          this package needs to link against the android.test library,
-         which is needed when building test cases. -->    
+         which is needed when building test cases. -->
     <application>
         <uses-library android:name="android.test.runner" />
     </application>
@@ -28,7 +28,7 @@
     <!--
     This declares that this app uses the instrumentation test runner targeting
     the package of com.android.email.  To run the tests use the command:
-    "adb shell am instrument -w com.android.email.tests/androidx.test.runner.AndroidJUnitRunner"
+    "adb shell am instrument -w com.android.email.tests"
     -->
     <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
                      android:targetPackage="com.android.email"
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
new file mode 100644
index 0000000..8cced70
--- /dev/null
+++ b/tests/AndroidTest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 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.
+-->
+<configuration description="Runs Email Tests.">
+    <option name="test-suite-tag" value="apct" />
+    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="EmailTests.apk" />
+        <option name="test-file-name" value="Email.apk" />
+    </target_preparer>
+
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+        <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
+        <option name="package" value="com.android.email.tests" />
+    </test>
+</configuration>