From bf6b626f909af873c77c156dafd592512a1f18a2 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 16 Jul 2020 16:27:48 -0700 Subject: Add rust_test and update TEST_MAPPING Test: atest -c --include-subdirs external/rust/crates Change-Id: I7b5dace931c81514ec1f67007cddfe49e03e485f --- Android.bp | 14 +++++++++++++- TEST_MAPPING | 9 +++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 TEST_MAPPING diff --git a/Android.bp b/Android.bp index b65ed9d..ad3f7e8 100644 --- a/Android.bp +++ b/Android.bp @@ -1,4 +1,4 @@ -// This file is generated by cargo2android.py --run --dependencies. +// This file is generated by cargo2android.py --run --dependencies --tests. rust_proc_macro { name: "libpaste_impl", @@ -10,5 +10,17 @@ rust_proc_macro { ], } +rust_test_host { + name: "paste-impl_host_test_src_lib", + crate_name: "paste_impl", + srcs: ["src/lib.rs"], + test_suites: ["general-tests"], + auto_gen_config: true, + edition: "2018", + proc_macros: [ + "libproc_macro_hack", + ], +} + // dependent_library ["feature_list"] // proc-macro-hack-0.5.16 diff --git a/TEST_MAPPING b/TEST_MAPPING new file mode 100644 index 0000000..c791286 --- /dev/null +++ b/TEST_MAPPING @@ -0,0 +1,9 @@ +// Generated by cargo2android.py for tests in Android.bp +{ + "presubmit": [ + { + "name": "paste-impl_host_test_src_lib", + "host": true + } + ] +} -- cgit v1.2.3