Support running on the host.

Test: atest the new tests
Change-Id: I317ff28092b61adf7033ca4c619a08ce5f67bafd
diff --git a/Android.bp b/Android.bp
index 473608f..066701b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,7 +1,7 @@
-// This file is generated by cargo2android.py --run --dependencies --device --features= --no-host --tests.
+// This file is generated by cargo2android.py --run --dependencies --device --features= --tests.
 
-rust_test {
-    name: "env_logger_device_test_src_lib",
+rust_defaults {
+    name: "env_logger_defaults",
     crate_name: "env_logger",
     srcs: ["src/lib.rs"],
     test_suites: ["general-tests"],
@@ -12,8 +12,18 @@
     ],
 }
 
+rust_test_host {
+    name: "env_logger_host_test_src_lib",
+    defaults: ["env_logger_defaults"],
+}
+
+rust_test {
+    name: "env_logger_device_test_src_lib",
+    defaults: ["env_logger_defaults"],
+}
+
 rust_defaults {
-    name: "env_logger_defaults",
+    name: "env_logger_defaults_env_logger",
     crate_name: "env_logger",
     test_suites: ["general-tests"],
     auto_gen_config: true,
@@ -27,32 +37,57 @@
     ],
 }
 
-rust_test {
-    name: "env_logger_device_test_tests_init-twice-retains-filter",
-    defaults: ["env_logger_defaults"],
+rust_test_host {
+    name: "env_logger_host_test_tests_init-twice-retains-filter",
+    defaults: ["env_logger_defaults_env_logger"],
     srcs: ["tests/init-twice-retains-filter.rs"],
 }
 
 rust_test {
-    name: "env_logger_device_test_tests_log-in-log",
-    defaults: ["env_logger_defaults"],
+    name: "env_logger_device_test_tests_init-twice-retains-filter",
+    defaults: ["env_logger_defaults_env_logger"],
+    srcs: ["tests/init-twice-retains-filter.rs"],
+}
+
+rust_test_host {
+    name: "env_logger_host_test_tests_log-in-log",
+    defaults: ["env_logger_defaults_env_logger"],
     srcs: ["tests/log-in-log.rs"],
 }
 
 rust_test {
-    name: "env_logger_device_test_tests_log_tls_dtors",
-    defaults: ["env_logger_defaults"],
+    name: "env_logger_device_test_tests_log-in-log",
+    defaults: ["env_logger_defaults_env_logger"],
+    srcs: ["tests/log-in-log.rs"],
+}
+
+rust_test_host {
+    name: "env_logger_host_test_tests_log_tls_dtors",
+    defaults: ["env_logger_defaults_env_logger"],
     srcs: ["tests/log_tls_dtors.rs"],
 }
 
 rust_test {
+    name: "env_logger_device_test_tests_log_tls_dtors",
+    defaults: ["env_logger_defaults_env_logger"],
+    srcs: ["tests/log_tls_dtors.rs"],
+}
+
+rust_test_host {
+    name: "env_logger_host_test_tests_regexp_filter",
+    defaults: ["env_logger_defaults_env_logger"],
+    srcs: ["tests/regexp_filter.rs"],
+}
+
+rust_test {
     name: "env_logger_device_test_tests_regexp_filter",
-    defaults: ["env_logger_defaults"],
+    defaults: ["env_logger_defaults_env_logger"],
     srcs: ["tests/regexp_filter.rs"],
 }
 
 rust_library {
     name: "libenv_logger",
+    host_supported: true,
     crate_name: "env_logger",
     srcs: ["src/lib.rs"],
     edition: "2018",
@@ -63,4 +98,4 @@
 
 // dependent_library ["feature_list"]
 //   cfg-if-0.1.10
-//   log-0.4.8 "std"
+//   log-0.4.11 "std"
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 862e8e2..5fc2219 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -2,18 +2,38 @@
 {
   "presubmit": [
     {
+      "name": "env_logger_host_test_src_lib",
+      "host": true
+    },
+    {
       "name": "env_logger_device_test_src_lib"
     },
     {
+      "name": "env_logger_host_test_tests_init-twice-retains-filter",
+      "host": true
+    },
+    {
       "name": "env_logger_device_test_tests_init-twice-retains-filter"
     },
     {
+      "name": "env_logger_host_test_tests_log-in-log",
+      "host": true
+    },
+    {
       "name": "env_logger_device_test_tests_log-in-log"
     },
     {
+      "name": "env_logger_host_test_tests_log_tls_dtors",
+      "host": true
+    },
+    {
       "name": "env_logger_device_test_tests_log_tls_dtors"
     },
     {
+      "name": "env_logger_host_test_tests_regexp_filter",
+      "host": true
+    },
+    {
       "name": "env_logger_device_test_tests_regexp_filter"
     }
   ]