aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-12-15 17:27:46 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-12-15 17:27:46 +0000
commitb3fe07184e24f1117887c65270eac76454373345 (patch)
treeeb1e049bf9eede3955a219153ea42a5043016912
parentbd1e3ec09bc17c2804f4400472236de8fe456822 (diff)
parent9935998aa7b73ca614507f0991a5673660bde76b (diff)
downloadvulkano-b3fe07184e24f1117887c65270eac76454373345.tar.gz
Merge "Refresh Android.bp, cargo2android.json, TEST_MAPPING." am: 5ac950e338 am: 70cc622d55 am: 9935998aa7
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vulkano/+/1912662 Change-Id: Ica9a5bb4a42dfb6522ec323158a991ada39c27aa
-rw-r--r--Android.bp31
-rw-r--r--TEST_MAPPING10
-rw-r--r--build.rs2
-rw-r--r--cargo2android.json4
-rw-r--r--patches/Android.bp.patch11
-rw-r--r--patches/build.rs.patch13
6 files changed, 19 insertions, 52 deletions
diff --git a/Android.bp b/Android.bp
index fa9215f..43c3c35 100644
--- a/Android.bp
+++ b/Android.bp
@@ -46,7 +46,6 @@ genrule {
rust_library {
name: "libvulkano",
- // has rustc warnings
host_supported: true,
crate_name: "vulkano",
cargo_env_compat: true,
@@ -72,18 +71,23 @@ rust_library {
],
}
-rust_defaults {
- name: "vulkano_test_defaults",
+rust_test {
+ name: "vulkano_test_src_lib",
+ host_supported: true,
crate_name: "vulkano",
- // has rustc warnings
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.25.0",
srcs: [
"src/lib.rs",
":copy_vulkano_build_out",
],
- cargo_env_compat: true,
- cargo_pkg_version: "0.25.0",
test_suites: ["general-tests"],
auto_gen_config: true,
+ // Manually disabled as these tests depend on specific graphics libraries
+ // being available on the machine running the tests.
+ test_options: {
+ unit_test: false,
+ },
edition: "2018",
rustlibs: [
"libash_rust",
@@ -96,18 +100,3 @@ rust_defaults {
"libsmallvec",
],
}
-
-rust_test_host {
- name: "vulkano_host_test_src_lib",
- defaults: ["vulkano_test_defaults"],
- // Manually disabled as these tests depend on specific graphics libraries
- // being available on the machine running the tests.
- test_options: {
- unit_test: false,
- },
-}
-
-rust_test {
- name: "vulkano_device_test_src_lib",
- defaults: ["vulkano_test_defaults"],
-}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index b205cd1..958c404 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,10 +1,2 @@
// Generated by update_crate_tests.py for tests that depend on this crate.
-{
- "presubmit": [
- // Manually disabled as these tests depend on specific graphics libraries
- // being available on the machine running the tests.
- //{
- // "name": "vulkano_device_test_src_lib"
- //}
- ]
-}
+{}
diff --git a/build.rs b/build.rs
index 4da24a1..1f2b2bf 100644
--- a/build.rs
+++ b/build.rs
@@ -7,8 +7,6 @@
// notice may not be copied, modified, or distributed except
// according to those terms.
-#![feature(str_split_once)]
-
use std::{env, fs::File, io::BufWriter, path::Path};
mod autogen;
diff --git a/cargo2android.json b/cargo2android.json
index d6a9e94..ea92969 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -5,7 +5,7 @@
],
"copy-out": true,
"device": true,
+ "patch": "patches/Android.bp.patch",
"run": true,
- "tests": true,
- "patch": "patches/Android.bp.patch"
+ "tests": true
} \ No newline at end of file
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
index 97e8d62..669a5e8 100644
--- a/patches/Android.bp.patch
+++ b/patches/Android.bp.patch
@@ -2,15 +2,16 @@ diff --git a/Android.bp b/Android.bp
index 8e11707..a156cb8 100644
--- a/Android.bp
+++ b/Android.bp
-@@ -62,8 +62,10 @@ rust_defaults {
- rust_test_host {
- name: "vulkano_host_test_src_lib",
- defaults: ["vulkano_test_defaults"],
+@@ -62,9 +62,11 @@ rust_test {
+ ],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ // Manually disabled as these tests depend on specific graphics libraries
+ // being available on the machine running the tests.
test_options: {
- unit_test: true,
+ unit_test: false,
},
- }
+ edition: "2018",
+ rustlibs: [
diff --git a/patches/build.rs.patch b/patches/build.rs.patch
deleted file mode 100644
index 4af564f..0000000
--- a/patches/build.rs.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/build.rs b/build.rs
-index 1f2b2bf5..4da24a10 100644
---- a/build.rs
-+++ b/build.rs
-@@ -7,6 +7,8 @@
- // notice may not be copied, modified, or distributed except
- // according to those terms.
-
-+#![feature(str_split_once)]
-+
- use std::{env, fs::File, io::BufWriter, path::Path};
-
- mod autogen;