diff options
author | Jeff Vander Stoep <jeffv@google.com> | 2021-10-27 12:53:43 +0200 |
---|---|---|
committer | Jeff Vander Stoep <jeffv@google.com> | 2021-10-27 20:50:28 +0200 |
commit | 8eac4626c469a8414308616de7319d16a7911ca6 (patch) | |
tree | f69339e403737561d45b70940a7746bd918bfcf9 | |
parent | ff6aa057a39489cf431282c5456a80f9225ac9ab (diff) | |
download | crc32fast-8eac4626c469a8414308616de7319d16a7911ca6.tar.gz |
Enable tests
Test: atest
-------
x86_64 crc32fast_device_test_src_lib: Passed: 4, Failed: 0, Ignored: 0, Assumption Failed: 0,
Change-Id: I3c5029aa348cca9966f4c2da73dd8f3a7133b670
Change-Id: I8f990d761c02285939b30af2ce73d8ba57d05614
-rw-r--r-- | Android.bp | 40 | ||||
-rw-r--r-- | TEST_MAPPING | 8 | ||||
-rw-r--r-- | cargo2android.json | 5 |
3 files changed, 41 insertions, 12 deletions
@@ -37,10 +37,47 @@ license { ], } +rust_defaults { + name: "crc32fast_test_defaults", + crate_name: "crc32fast", + srcs: ["src/lib.rs"], + cargo_env_compat: true, + cargo_pkg_version: "1.2.1", + test_suites: ["general-tests"], + auto_gen_config: true, + edition: "2015", + features: [ + "default", + "std", + ], + cfgs: ["crc32fast_stdarchx86"], + rustlibs: [ + "libbencher", + "libcfg_if", + "libquickcheck", + "librand", + ], +} + +rust_test_host { + name: "crc32fast_host_test_src_lib", + defaults: ["crc32fast_test_defaults"], + test_options: { + unit_test: true, + }, +} + +rust_test { + name: "crc32fast_device_test_src_lib", + defaults: ["crc32fast_test_defaults"], +} + rust_library { name: "libcrc32fast", host_supported: true, crate_name: "crc32fast", + cargo_env_compat: true, + cargo_pkg_version: "1.2.1", srcs: ["src/lib.rs"], edition: "2015", features: [ @@ -56,6 +93,3 @@ rust_library { "com.android.virt", ], } - -// dependent_library ["feature_list"] -// cfg-if-1.0.0 diff --git a/TEST_MAPPING b/TEST_MAPPING index 82662b1..2f9b261 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -2,19 +2,13 @@ { "presubmit": [ { - "name": "ZipFuseTest" + "name": "crc32fast_device_test_src_lib" }, { "name": "libapkverify.integration_test" }, { "name": "libapkverify.test" - }, - { - "name": "microdroid_manager_test" - }, - { - "name": "virtualizationservice_device_test" } ] } diff --git a/cargo2android.json b/cargo2android.json index 42b7833..72ca2d4 100644 --- a/cargo2android.json +++ b/cargo2android.json @@ -5,5 +5,6 @@ ], "dependencies": true, "device": true, - "run": true -}
\ No newline at end of file + "run": true, + "tests": true +} |