From 8f396c6a88bd454e136751222ac3848e712dd845 Mon Sep 17 00:00:00 2001 From: Joel Galenson Date: Mon, 29 Nov 2021 14:05:55 -0800 Subject: Refresh Android.bp, cargo2android.json, TEST_MAPPING. Manually delete one patch and modify another. Test: None Change-Id: I640c202e54e46f97c0a5641169c37645591ca83e --- Android.bp | 31 ++++++++++--------------------- TEST_MAPPING | 10 +--------- build.rs | 2 -- cargo2android.json | 4 ++-- patches/Android.bp.patch | 11 ++++++----- patches/build.rs.patch | 13 ------------- 6 files changed, 19 insertions(+), 52 deletions(-) delete mode 100644 patches/build.rs.patch 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; -- cgit v1.2.3