aconfig: re-enable development with cargo
The integration tests introduced in 906405f5c97 depend on libraries
auto-generated by running aconfig. This works fine for the Android build
system, but breaks `cargo t`.
Disable the tests when using `cargo t` for local development. Cargo can
be used for rapid local development, including running unit tests;
integration tests should be run using atest.
Bug: 298904077
Test: cargo t
Test: atest aconfig.test_mode.test.rust aconfig.prod_mode.test.rust
Change-Id: Ifcd374fa6efdc121cbfd4c4ac4fb43cf9cacc192
diff --git a/tools/aconfig/tests/aconfig_prod_mode_test.rs b/tools/aconfig/tests/aconfig_prod_mode_test.rs
index 708604b..950c441 100644
--- a/tools/aconfig/tests/aconfig_prod_mode_test.rs
+++ b/tools/aconfig/tests/aconfig_prod_mode_test.rs
@@ -1,3 +1,4 @@
+#[cfg(not(feature = "cargo"))]
#[test]
fn test_flags() {
assert!(!aconfig_test_rust_library::disabled_ro());
diff --git a/tools/aconfig/tests/aconfig_test_mode_test.rs b/tools/aconfig/tests/aconfig_test_mode_test.rs
index 7d40a44..3f56d2c 100644
--- a/tools/aconfig/tests/aconfig_test_mode_test.rs
+++ b/tools/aconfig/tests/aconfig_test_mode_test.rs
@@ -1,3 +1,4 @@
+#[cfg(not(feature = "cargo"))]
#[test]
fn test_flags() {
assert!(!aconfig_test_rust_library::disabled_ro());