ATest: Add atest as a build target

For atest prebuilt binary release process.

Bug: 118245886
Test: make -j atest
      $ANDROID_HOST_OUT/bin/atest --help
      $ANDROID_HOST_OUT/bin/atest -v hello_world_test
      $ANDROID_HOST_OUT/bin/atest RunBluetoothRoboTests
      $ANDROID_HOST_OUT/bin/atest example/reboot
      $ANDROID_HOST_OUT/bin/atest FrameworksServicesTests:ScreenDecorWindowTests#testFlagChange,testRemoval
      $ANDROID_HOST_OUT/bin/atest ahat-tests --host
      make -j dist (check if atest under out/dist/)

Change-Id: Id55148175c189102ca5105a8e97f496c2c405e5f
diff --git a/atest/Android.bp b/atest/Android.bp
index 00ef44d..3891566 100644
--- a/atest/Android.bp
+++ b/atest/Android.bp
@@ -27,6 +27,22 @@
     },
 }
 
+// Remove this defaults after python3 migration is finished.
+python_defaults {
+    name: "atest_py2_default",
+    pkg_path: "atest",
+    version: {
+        py2: {
+            enabled: true,
+            embedded_launcher: false,
+        },
+        py3: {
+            enabled: false,
+            embedded_launcher: false,
+        },
+    },
+}
+
 python_binary_host {
     name: "atest",
     main: "atest.py",
@@ -37,7 +53,7 @@
         "*_unittest.py",
         "*/*_unittest.py",
     ],
-    defaults: ["py2_only"],
+    defaults: ["atest_py2_default"],
 }
 
 python_library_host {
diff --git a/atest/Android.mk b/atest/Android.mk
new file mode 100644
index 0000000..09c1b05
--- /dev/null
+++ b/atest/Android.mk
@@ -0,0 +1,16 @@
+#
+# Copyright 2018 - 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.
+
+$(call dist-for-goals,droidcore,$(HOST_OUT_EXECUTABLES)/atest)