diff options
author | Andrew Walbran <qwandor@google.com> | 2023-11-16 16:29:24 +0000 |
---|---|---|
committer | Andrew Walbran <qwandor@google.com> | 2023-11-16 16:29:24 +0000 |
commit | 04b026a7b997051e2877ef4b109aab782cf849ac (patch) | |
tree | aea6abc33d226a65a848cc6d11dc7730df38fa55 | |
parent | d01ae55b3b40ca08468be23e6546f39570020e83 (diff) | |
download | tracing-core-04b026a7b997051e2877ef4b109aab782cf849ac.tar.gz |
Migrate to cargo_embargo.
Bug: 293289578
Test: Ran cargo_embargo, compared Android.bp
Change-Id: Ida350dc5f3fc6cb8772f354f2388890582003c41
-rw-r--r-- | Android.bp | 70 | ||||
-rw-r--r-- | cargo2android.json | 5 | ||||
-rw-r--r-- | cargo_embargo.json | 4 |
3 files changed, 47 insertions, 32 deletions
@@ -1,4 +1,4 @@ -// This file is generated by cargo2android.py --config cargo2android.json. +// This file is generated by cargo_embargo. // Do not modify this file as changes will be overridden on upgrade. package { @@ -20,7 +20,6 @@ license { rust_library { name: "libtracing_core", - // has rustc warnings host_supported: true, crate_name: "tracing_core", cargo_env_compat: true, @@ -33,9 +32,7 @@ rust_library { "std", "valuable", ], - rustlibs: [ - "libonce_cell", - ], + rustlibs: ["libonce_cell"], apex_available: [ "//apex_available:platform", "//apex_available:anyapex", @@ -46,7 +43,6 @@ rust_library { rust_test { name: "tracing-core_test_src_lib", - // has rustc warnings host_supported: true, crate_name: "tracing_core", cargo_env_compat: true, @@ -64,18 +60,21 @@ rust_test { "std", "valuable", ], - rustlibs: [ - "libonce_cell", - ], + rustlibs: ["libonce_cell"], } -rust_defaults { - name: "tracing-core_test_defaults", - crate_name: "tracing_core", +rust_test { + name: "tracing-core_test_tests_dispatch", + host_supported: true, + crate_name: "dispatch", cargo_env_compat: true, cargo_pkg_version: "0.1.30", + srcs: ["tests/dispatch.rs"], test_suites: ["general-tests"], auto_gen_config: true, + test_options: { + unit_test: true, + }, edition: "2018", features: [ "default", @@ -90,34 +89,51 @@ rust_defaults { } rust_test { - name: "tracing-core_test_tests_dispatch", - defaults: ["tracing-core_test_defaults"], - // has rustc warnings - host_supported: true, - srcs: ["tests/dispatch.rs"], - test_options: { - unit_test: true, - }, -} - -rust_test { name: "tracing-core_test_tests_global_dispatch", - defaults: ["tracing-core_test_defaults"], - // has rustc warnings host_supported: true, + crate_name: "global_dispatch", + cargo_env_compat: true, + cargo_pkg_version: "0.1.30", srcs: ["tests/global_dispatch.rs"], + test_suites: ["general-tests"], + auto_gen_config: true, test_options: { unit_test: true, }, + edition: "2018", + features: [ + "default", + "once_cell", + "std", + "valuable", + ], + rustlibs: [ + "libonce_cell", + "libtracing_core", + ], } rust_test { name: "tracing-core_test_tests_macros", - defaults: ["tracing-core_test_defaults"], - // has rustc warnings host_supported: true, + crate_name: "macros", + cargo_env_compat: true, + cargo_pkg_version: "0.1.30", srcs: ["tests/macros.rs"], + test_suites: ["general-tests"], + auto_gen_config: true, test_options: { unit_test: true, }, + edition: "2018", + features: [ + "default", + "once_cell", + "std", + "valuable", + ], + rustlibs: [ + "libonce_cell", + "libtracing_core", + ], } diff --git a/cargo2android.json b/cargo2android.json deleted file mode 100644 index aefb658..0000000 --- a/cargo2android.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "run": true, - "device": true, - "tests": true -} diff --git a/cargo_embargo.json b/cargo_embargo.json new file mode 100644 index 0000000..c8842d1 --- /dev/null +++ b/cargo_embargo.json @@ -0,0 +1,4 @@ +{ + "run_cargo": false, + "tests": true +} |