aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-11-10 17:20:43 +0000
committerAndrew Walbran <qwandor@google.com>2023-11-10 17:20:43 +0000
commitd8f808cb55fb0a339f34c7e982a86741da8067e6 (patch)
tree5ac899ecb853fb1b5a210af741ea0c1ed1e4c9a6
parent9949c6358d8c478373d0239497b42e423353f995 (diff)
downloadgetrandom-d8f808cb55fb0a339f34c7e982a86741da8067e6.tar.gz
Migrate to cargo_embargo.
Bug: 293289578 Test: Ran cargo_embargo, compared Android.bp Change-Id: I9d73b40be5cee6369ccde12bdf1eeea45a864a4c
-rw-r--r--Android.bp36
-rw-r--r--cargo2android.json8
-rw-r--r--cargo_embargo.json6
3 files changed, 27 insertions, 23 deletions
diff --git a/Android.bp b/Android.bp
index a23a93d..bbd1507 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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 {
@@ -57,13 +57,18 @@ rust_test {
],
}
-rust_defaults {
- name: "getrandom_test_defaults",
- crate_name: "getrandom",
+rust_test {
+ name: "getrandom_test_tests_normal",
+ host_supported: true,
+ crate_name: "normal",
cargo_env_compat: true,
cargo_pkg_version: "0.2.8",
+ srcs: ["tests/normal.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
edition: "2018",
features: ["std"],
rustlibs: [
@@ -74,23 +79,24 @@ rust_defaults {
}
rust_test {
- name: "getrandom_test_tests_normal",
- defaults: ["getrandom_test_defaults"],
- host_supported: true,
- srcs: ["tests/normal.rs"],
- test_options: {
- unit_test: true,
- },
-}
-
-rust_test {
name: "getrandom_test_tests_rdrand",
- defaults: ["getrandom_test_defaults"],
host_supported: true,
+ crate_name: "rdrand",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.2.8",
srcs: ["tests/rdrand.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2018",
+ features: ["std"],
+ rustlibs: [
+ "libcfg_if",
+ "libgetrandom",
+ "liblibc",
+ ],
}
rust_library {
diff --git a/cargo2android.json b/cargo2android.json
deleted file mode 100644
index 305a6eb..0000000
--- a/cargo2android.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "dependencies": true,
- "device": true,
- "features": "std",
- "run": true,
- "tests": true,
- "vendor-available": true
-}
diff --git a/cargo_embargo.json b/cargo_embargo.json
new file mode 100644
index 0000000..f1149bc
--- /dev/null
+++ b/cargo_embargo.json
@@ -0,0 +1,6 @@
+{
+ "features": [
+ "std"
+ ],
+ "tests": true
+}