diff --git a/veilid-core/Cargo.toml b/veilid-core/Cargo.toml index fa0656da..9a239431 100644 --- a/veilid-core/Cargo.toml +++ b/veilid-core/Cargo.toml @@ -14,8 +14,8 @@ default = [] rt-async-std = [ "async-std", "async-std-resolver", "async_executors/async_std", "rtnetlink?/smol_socket", "veilid-tools/rt-async-std" ] rt-tokio = [ "tokio", "tokio-util", "tokio-stream", "trust-dns-resolver/tokio-runtime", "async_executors/tokio_tp", "async_executors/tokio_io", "async_executors/tokio_timer", "rtnetlink?/tokio_socket", "veilid-tools/rt-tokio" ] -android_tests = [] -ios_tests = [ "simplelog" ] +keyring_manager_android_tests = [] +veilid_core_ios_tests = [ "simplelog" ] tracking = [] [dependencies] diff --git a/veilid-core/run_tests.sh b/veilid-core/run_tests.sh index a4bbb16f..deed7641 100755 --- a/veilid-core/run_tests.sh +++ b/veilid-core/run_tests.sh @@ -30,8 +30,8 @@ elif [[ "$1" == "android" ]]; then echo "No emulator ID specified" exit 1 fi - APPNAME=veilidcore-tests - APPID=com.veilid.veilidcore_tests + APPNAME=veilid_core_android_tests + APPID=com.veilid.veilid_core_android_tests ACTIVITYNAME=MainActivity pushd src/tests/android/$APPNAME >/dev/null # Build apk @@ -45,7 +45,7 @@ elif [[ "$1" == "android" ]]; then # Get the pid of the program APP_PID=`adb -s $ID shell pidof -s $APPID` # Print the logcat - adb -s $ID shell logcat -d veilid-core:V *:S & + adb -s $ID shell logcat --pid=$APP_PID veilid-core:V *:S & # Wait for the pid to be done while [ "$(adb -s $ID shell pidof -s $APPID)" != "" ]; do sleep 1 diff --git a/veilid-core/src/intf/native/mod.rs b/veilid-core/src/intf/native/mod.rs index 369a0183..8f7e39bf 100644 --- a/veilid-core/src/intf/native/mod.rs +++ b/veilid-core/src/intf/native/mod.rs @@ -10,6 +10,6 @@ pub use table_store::*; #[cfg(target_os = "android")] pub mod android; -#[cfg(all(target_os = "ios", feature = "ios_tests"))] +#[cfg(all(target_os = "ios", feature = "veilid_core_ios_tests"))] pub mod ios_test_setup; pub mod network_interfaces; diff --git a/veilid-core/src/lib.rs b/veilid-core/src/lib.rs index e8dbcff8..d8379b94 100644 --- a/veilid-core/src/lib.rs +++ b/veilid-core/src/lib.rs @@ -1,6 +1,6 @@ #![deny(clippy::all)] #![deny(unused_must_use)] -#![recursion_limit = "1024"] +#![recursion_limit = "256"] cfg_if::cfg_if! { if #[cfg(target_arch = "wasm32")] { diff --git a/veilid-core/src/tests/android/app/build.gradle b/veilid-core/src/tests/android/app/build.gradle index 25ad2c38..0c7d08ce 100644 --- a/veilid-core/src/tests/android/app/build.gradle +++ b/veilid-core/src/tests/android/app/build.gradle @@ -7,7 +7,7 @@ android { buildToolsVersion "30.0.3" defaultConfig { - applicationId "com.veilid.veilidcore.veilidcore_android_tests" + applicationId "com.veilid.veilid_core_android_tests" minSdkVersion 24 targetSdkVersion 30 versionCode 1 @@ -69,7 +69,7 @@ cargo { profile = gradle.startParameter.taskNames.any{it.toLowerCase().contains("debug")} ? "debug" : "release" pythonCommand = "python3" features { - defaultAnd("android_tests", "rt-tokio") + defaultAnd("veilid_core_android_tests", "rt-tokio") } } diff --git a/veilid-core/src/tests/android/app/src/main/AndroidManifest.xml b/veilid-core/src/tests/android/app/src/main/AndroidManifest.xml index a0f77f64..8f900643 100644 --- a/veilid-core/src/tests/android/app/src/main/AndroidManifest.xml +++ b/veilid-core/src/tests/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="com.veilid.veilid_core_android_tests"> diff --git a/veilid-core/src/tests/android/app/src/main/java/com/veilid/veilid-core/veilid-core_android_tests/MainActivity.java b/veilid-core/src/tests/android/app/src/main/java/com/veilid/veilid-core/veilid-core_android_tests/MainActivity.java index 00724e1b..43a65090 100644 --- a/veilid-core/src/tests/android/app/src/main/java/com/veilid/veilid-core/veilid-core_android_tests/MainActivity.java +++ b/veilid-core/src/tests/android/app/src/main/java/com/veilid/veilid-core/veilid-core_android_tests/MainActivity.java @@ -1,4 +1,4 @@ -package com.veilid.veilidcore.veilidcore_android_tests; +package com.veilid.veilid_core_android_tests; import androidx.appcompat.app.AppCompatActivity; import android.content.Context; diff --git a/veilid-core/src/tests/android/remove_from_all_devices.sh b/veilid-core/src/tests/android/remove_from_all_devices.sh index d3eace9d..b13b8775 100755 --- a/veilid-core/src/tests/android/remove_from_all_devices.sh +++ b/veilid-core/src/tests/android/remove_from_all_devices.sh @@ -1,3 +1,3 @@ #!/bin/bash -./adb+.sh uninstall com.veilid.veilidcore.veilidcore_android_tests +./adb+.sh uninstall com.veilid.veilid_core_android_tests diff --git a/veilid-core/src/tests/ios/veilidcore-tests/veilidcore-tests.xcodeproj/project.pbxproj b/veilid-core/src/tests/ios/veilidcore-tests/veilidcore-tests.xcodeproj/project.pbxproj index 9467bfd8..85356d38 100644 --- a/veilid-core/src/tests/ios/veilidcore-tests/veilidcore-tests.xcodeproj/project.pbxproj +++ b/veilid-core/src/tests/ios/veilidcore-tests/veilidcore-tests.xcodeproj/project.pbxproj @@ -167,7 +167,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "../../../../ios_build.sh --features ios_tests\n"; + shellScript = "../../../../../scripts/ios_build.sh ../../../../ veilid_core --features veilid_core_ios_tests,rt-tokio\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -209,7 +209,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = arm64; + ARCHS = "$(ARCHS_STANDARD)"; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -264,6 +264,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; @@ -271,7 +272,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = arm64; + ARCHS = "$(ARCHS_STANDARD)"; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -319,6 +320,7 @@ SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -339,11 +341,11 @@ ); OTHER_LDFLAGS = ""; "OTHER_LDFLAGS[sdk=iphoneos*]" = ( - "-L../../../../../target/aarch64-apple-ios/debug", + "-L../../../../../target/lipo-ios/debug", "-lveilid_core", ); "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( - "-L../../../../../target/x86_64-apple-ios/debug", + "-L../../../../../target/lipo-ios-sim/debug", "-lveilid_core", ); PRODUCT_BUNDLE_IDENTIFIER = "com.veilid.veilidcore-tests"; @@ -371,11 +373,11 @@ ); OTHER_LDFLAGS = ""; "OTHER_LDFLAGS[sdk=iphoneos*]" = ( - "-L../../../../../target/aarch64-apple-ios/release", + "-L../../../../../target/lipo-ios/release", "-lveilid_core", ); "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( - "-L../../../../../target/x86_64-apple-ios/release", + "-L../../../../../target/lipo-ios-sim/release", "-lveilid_core", ); PRODUCT_BUNDLE_IDENTIFIER = "com.veilid.veilidcore-tests"; diff --git a/veilid-core/src/tests/native/mod.rs b/veilid-core/src/tests/native/mod.rs index a7a0580d..b1f96995 100644 --- a/veilid-core/src/tests/native/mod.rs +++ b/veilid-core/src/tests/native/mod.rs @@ -5,13 +5,13 @@ use crate::network_manager::tests::*; use crate::tests::common::*; use crate::*; -#[cfg(all(target_os = "android", feature = "android_tests"))] +#[cfg(all(target_os = "android", feature = "veilid_core_android_tests"))] use jni::{objects::JClass, objects::JObject, JNIEnv}; -#[cfg(all(target_os = "android", feature = "android_tests"))] +#[cfg(all(target_os = "android", feature = "veilid_core_android_tests"))] #[no_mangle] #[allow(non_snake_case)] -pub extern "system" fn Java_com_veilid_veilidcore_veilidcore_1android_1tests_MainActivity_run_1tests( +pub extern "system" fn Java_com_veilid_veilid_1core_1android_1tests_MainActivity_run_1tests( env: JNIEnv, _class: JClass, ctx: JObject, @@ -25,7 +25,7 @@ pub extern "system" fn Java_com_veilid_veilidcore_veilidcore_1android_1tests_Mai run_all_tests(); } -#[cfg(all(target_os = "ios", feature = "ios_tests"))] +#[cfg(all(target_os = "ios", feature = "veilid_core_ios_tests"))] #[no_mangle] pub extern "C" fn run_veilid_core_tests() { let log_path: std::path::PathBuf = [ diff --git a/veilid-flutter/android/build.gradle b/veilid-flutter/android/build.gradle index e16cf76c..b59ea533 100644 --- a/veilid-flutter/android/build.gradle +++ b/veilid-flutter/android/build.gradle @@ -88,9 +88,6 @@ cargo { prebuiltToolchains = true pythonCommand = "python3" profile = gradle.startParameter.taskNames.any{it.toLowerCase().contains("debug")} ? "debug" : "release" - // features { - // defaultAnd("android_tests") - // } } afterEvaluate { diff --git a/veilid-tools/Cargo.toml b/veilid-tools/Cargo.toml index d85ae4c6..2adf291b 100644 --- a/veilid-tools/Cargo.toml +++ b/veilid-tools/Cargo.toml @@ -14,9 +14,8 @@ default = [] rt-async-std = [ "async-std", "async_executors/async_std", ] rt-tokio = [ "tokio", "tokio-util", "async_executors/tokio_tp", "async_executors/tokio_io", "async_executors/tokio_timer", ] -android_tests = [ "dep:tracing-android" ] -ios_tests = [] -tracking = [] +veilid_tools_android_tests = [ "dep:tracing-android" ] +veilid_tools_ios_tests = [] tracing = [ "dep:tracing", "dep:tracing-subscriber" ] [dependencies] diff --git a/veilid-tools/run_tests.sh b/veilid-tools/run_tests.sh index 86126884..0267d8aa 100755 --- a/veilid-tools/run_tests.sh +++ b/veilid-tools/run_tests.sh @@ -30,8 +30,8 @@ elif [[ "$1" == "android" ]]; then echo "No emulator ID specified" exit 1 fi - APPNAME=veilidtools-tests - APPID=com.veilid.veilidtools_tests + APPNAME=veilid_tools_android_tests + APPID=com.veilid.veilid_tools_android_tests ACTIVITYNAME=MainActivity pushd src/tests/android/$APPNAME >/dev/null # Build apk @@ -45,7 +45,7 @@ elif [[ "$1" == "android" ]]; then # Get the pid of the program APP_PID=`adb -s $ID shell pidof -s $APPID` # Print the logcat - adb -s $ID shell logcat -d veilid-tools:V *:S & + adb -s $ID shell logcat --pid=$APP_PID veilid-tools:V *:S & # Wait for the pid to be done while [ "$(adb -s $ID shell pidof -s $APPID)" != "" ]; do sleep 1 @@ -56,9 +56,9 @@ elif [[ "$1" == "android" ]]; then popd >/dev/null else + cargo test --features=rt-tokio,tracing + cargo test --features=rt-async-std,tracing cargo test --features=rt-tokio cargo test --features=rt-async-std - cargo test --features=rt-tokio,log --no-default-features - cargo test --features=rt-async-std,log --no-default-features fi popd 2>/dev/null \ No newline at end of file diff --git a/veilid-tools/src/tests/android/veilidtools-tests/.gitignore b/veilid-tools/src/tests/android/veilid_tools_android_tests/.gitignore similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/.gitignore rename to veilid-tools/src/tests/android/veilid_tools_android_tests/.gitignore diff --git a/veilid-tools/src/tests/android/veilidtools-tests/.idea/.gitignore b/veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/.gitignore similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/.idea/.gitignore rename to veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/.gitignore diff --git a/veilid-tools/src/tests/android/veilidtools-tests/.idea/.name b/veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/.name similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/.idea/.name rename to veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/.name diff --git a/veilid-tools/src/tests/android/veilidtools-tests/.idea/compiler.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/compiler.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/.idea/compiler.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/compiler.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/.idea/gradle.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/gradle.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/.idea/gradle.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/gradle.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/.idea/jarRepositories.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/jarRepositories.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/.idea/jarRepositories.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/jarRepositories.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/.idea/misc.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/misc.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/.idea/misc.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/misc.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/.idea/vcs.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/vcs.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/.idea/vcs.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/.idea/vcs.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/.project b/veilid-tools/src/tests/android/veilid_tools_android_tests/.project similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/.project rename to veilid-tools/src/tests/android/veilid_tools_android_tests/.project diff --git a/veilid-tools/src/tests/android/veilidtools-tests/.settings/org.eclipse.buildship.core.prefs b/veilid-tools/src/tests/android/veilid_tools_android_tests/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/.settings/org.eclipse.buildship.core.prefs rename to veilid-tools/src/tests/android/veilid_tools_android_tests/.settings/org.eclipse.buildship.core.prefs diff --git a/veilid-tools/src/tests/android/veilidtools-tests/adb+.sh b/veilid-tools/src/tests/android/veilid_tools_android_tests/adb+.sh similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/adb+.sh rename to veilid-tools/src/tests/android/veilid_tools_android_tests/adb+.sh diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/.classpath b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/.classpath similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/.classpath rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/.classpath diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/.gitignore b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/.gitignore similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/.gitignore rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/.gitignore diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/.project b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/.project similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/.project rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/.project diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/.settings/org.eclipse.buildship.core.prefs b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/.settings/org.eclipse.buildship.core.prefs rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/.settings/org.eclipse.buildship.core.prefs diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/CMakeLists.txt b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/CMakeLists.txt similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/CMakeLists.txt rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/CMakeLists.txt diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/build.gradle b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/build.gradle similarity index 68% rename from veilid-tools/src/tests/android/veilidtools-tests/app/build.gradle rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/build.gradle index 5e30101c..ebcf32e0 100644 --- a/veilid-tools/src/tests/android/veilidtools-tests/app/build.gradle +++ b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/build.gradle @@ -7,7 +7,7 @@ android { buildToolsVersion "33.0.1" defaultConfig { - applicationId "com.veilid.veilidtools_tests" + applicationId "com.veilid.veilid_tools_android_tests" minSdkVersion 24 targetSdkVersion 33 versionCode 1 @@ -47,25 +47,7 @@ android { path file('CMakeLists.txt') } } - namespace 'com.veilid.veilidtools_tests' - - testOptions { - managedDevices { - devices { - pixel2api30 (com.android.build.api.dsl.ManagedVirtualDevice) { - // Use device profiles you typically see in Android Studio. - device = "Pixel 2" - // ATD currently support only API level 30. - apiLevel = 30 - // You can also specify "google-atd" if you require Google - // Play Services. - systemImageSource = "aosp-atd" - // Whether the image must be a 64 bit image. - require64Bit = false - } - } - } - } + namespace 'com.veilid.veilid_tools_android_tests' } dependencies { @@ -73,9 +55,6 @@ dependencies { implementation 'com.google.android.material:material:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.security:security-crypto:1.1.0-alpha04' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0' - androidTestImplementation 'androidx.test:runner:1.5.1' - androidTestImplementation 'androidx.test:rules:1.5.0' } apply plugin: 'org.mozilla.rust-android-gradle.rust-android' @@ -89,7 +68,7 @@ cargo { profile = gradle.startParameter.taskNames.any{it.toLowerCase().contains("debug")} ? "debug" : "release" pythonCommand = "python3" features { - defaultAnd("android_tests", "rt-tokio") + defaultAnd("veilid_tools_android_tests", "rt-tokio") } } diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/cpplink.cpp b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/cpplink.cpp similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/cpplink.cpp rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/cpplink.cpp diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/proguard-rules.pro b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/proguard-rules.pro similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/proguard-rules.pro rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/proguard-rules.pro diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/AndroidManifest.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/AndroidManifest.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/AndroidManifest.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/AndroidManifest.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/java/com/veilid/veilidtools_tests/MainActivity.java b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/java/com/veilid/veilid_tools_android_tests/MainActivity.java similarity index 94% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/java/com/veilid/veilidtools_tests/MainActivity.java rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/java/com/veilid/veilid_tools_android_tests/MainActivity.java index 8e24334f..519bd437 100644 --- a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/java/com/veilid/veilidtools_tests/MainActivity.java +++ b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/java/com/veilid/veilid_tools_android_tests/MainActivity.java @@ -1,4 +1,4 @@ -package com.veilid.veilidtools_tests; +package com.veilid.veilid_tools_android_tests; import androidx.appcompat.app.AppCompatActivity; import android.content.Context; diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/drawable-v24/ic_launcher_foreground.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/drawable-v24/ic_launcher_foreground.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/drawable/ic_launcher_background.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/drawable/ic_launcher_background.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/drawable/ic_launcher_background.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/layout/activity_main.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/layout/activity_main.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/layout/activity_main.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/layout/activity_main.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-hdpi/ic_launcher.png b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-hdpi/ic_launcher_round.png rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-mdpi/ic_launcher.png b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-mdpi/ic_launcher_round.png rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/values-night/themes.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/values-night/themes.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/values-night/themes.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/values-night/themes.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/values/colors.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/values/colors.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/values/colors.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/values/colors.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/values/strings.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/values/strings.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/values/strings.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/values/strings.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/values/themes.xml b/veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/values/themes.xml similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/app/src/main/res/values/themes.xml rename to veilid-tools/src/tests/android/veilid_tools_android_tests/app/src/main/res/values/themes.xml diff --git a/veilid-tools/src/tests/android/veilidtools-tests/build.gradle b/veilid-tools/src/tests/android/veilid_tools_android_tests/build.gradle similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/build.gradle rename to veilid-tools/src/tests/android/veilid_tools_android_tests/build.gradle diff --git a/veilid-tools/src/tests/android/veilidtools-tests/gradle.properties b/veilid-tools/src/tests/android/veilid_tools_android_tests/gradle.properties similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/gradle.properties rename to veilid-tools/src/tests/android/veilid_tools_android_tests/gradle.properties diff --git a/veilid-tools/src/tests/android/veilidtools-tests/gradle/wrapper/gradle-wrapper.jar b/veilid-tools/src/tests/android/veilid_tools_android_tests/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/gradle/wrapper/gradle-wrapper.jar rename to veilid-tools/src/tests/android/veilid_tools_android_tests/gradle/wrapper/gradle-wrapper.jar diff --git a/veilid-tools/src/tests/android/veilidtools-tests/gradle/wrapper/gradle-wrapper.properties b/veilid-tools/src/tests/android/veilid_tools_android_tests/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/gradle/wrapper/gradle-wrapper.properties rename to veilid-tools/src/tests/android/veilid_tools_android_tests/gradle/wrapper/gradle-wrapper.properties diff --git a/veilid-tools/src/tests/android/veilidtools-tests/gradlew b/veilid-tools/src/tests/android/veilid_tools_android_tests/gradlew similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/gradlew rename to veilid-tools/src/tests/android/veilid_tools_android_tests/gradlew diff --git a/veilid-tools/src/tests/android/veilidtools-tests/gradlew.bat b/veilid-tools/src/tests/android/veilid_tools_android_tests/gradlew.bat similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/gradlew.bat rename to veilid-tools/src/tests/android/veilid_tools_android_tests/gradlew.bat diff --git a/veilid-tools/src/tests/android/veilidtools-tests/install_on_all_devices.sh b/veilid-tools/src/tests/android/veilid_tools_android_tests/install_on_all_devices.sh similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/install_on_all_devices.sh rename to veilid-tools/src/tests/android/veilid_tools_android_tests/install_on_all_devices.sh diff --git a/veilid-tools/src/tests/android/veilid_tools_android_tests/remove_from_all_devices.sh b/veilid-tools/src/tests/android/veilid_tools_android_tests/remove_from_all_devices.sh new file mode 100755 index 00000000..e76b7cff --- /dev/null +++ b/veilid-tools/src/tests/android/veilid_tools_android_tests/remove_from_all_devices.sh @@ -0,0 +1,3 @@ +#!/bin/bash +./adb+.sh uninstall com.veilid.veilid_tools_android_tests + diff --git a/veilid-tools/src/tests/android/veilidtools-tests/settings.gradle b/veilid-tools/src/tests/android/veilid_tools_android_tests/settings.gradle similarity index 100% rename from veilid-tools/src/tests/android/veilidtools-tests/settings.gradle rename to veilid-tools/src/tests/android/veilid_tools_android_tests/settings.gradle diff --git a/veilid-tools/src/tests/android/veilidtools-tests/remove_from_all_devices.sh b/veilid-tools/src/tests/android/veilidtools-tests/remove_from_all_devices.sh deleted file mode 100755 index eea0ef7e..00000000 --- a/veilid-tools/src/tests/android/veilidtools-tests/remove_from_all_devices.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -./adb+.sh uninstall com.veilid.veilidtools.veilidtools_android_tests - diff --git a/veilid-tools/src/tests/ios/veilidtools-tests/veilidtools-tests.xcodeproj/project.pbxproj b/veilid-tools/src/tests/ios/veilidtools-tests/veilidtools-tests.xcodeproj/project.pbxproj index 17193b37..153d3208 100644 --- a/veilid-tools/src/tests/ios/veilidtools-tests/veilidtools-tests.xcodeproj/project.pbxproj +++ b/veilid-tools/src/tests/ios/veilidtools-tests/veilidtools-tests.xcodeproj/project.pbxproj @@ -167,7 +167,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "../../../../../scripts/ios_build.sh ../../../../ veilid_tools --features ios_tests,rt-tokio\n"; + shellScript = "../../../../../scripts/ios_build.sh ../../../../ veilid_tools --features veilid_tools_ios_tests,rt-tokio\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/veilid-tools/src/tests/native/mod.rs b/veilid-tools/src/tests/native/mod.rs index b4d2728e..120fa9cb 100644 --- a/veilid-tools/src/tests/native/mod.rs +++ b/veilid-tools/src/tests/native/mod.rs @@ -5,13 +5,13 @@ mod test_async_peek_stream; use super::*; -#[cfg(all(target_os = "android", feature = "android_tests"))] +#[cfg(all(target_os = "android", feature = "veilid_tools_android_tests"))] use jni::{objects::JClass, objects::JObject, JNIEnv}; -#[cfg(all(target_os = "android", feature = "android_tests"))] +#[cfg(all(target_os = "android", feature = "veilid_tools_android_tests"))] #[no_mangle] #[allow(non_snake_case)] -pub extern "system" fn Java_com_veilid_veilidtools_1tests_MainActivity_run_1tests( +pub extern "system" fn Java_com_veilid_veilid_1tools_1android_1tests_MainActivity_run_1tests( env: JNIEnv, _class: JClass, ctx: JObject, @@ -20,7 +20,7 @@ pub extern "system" fn Java_com_veilid_veilidtools_1tests_MainActivity_run_1test run_all_tests(); } -#[cfg(all(target_os = "ios", feature = "ios_tests"))] +#[cfg(all(target_os = "ios", feature = "veilid_tools_ios_tests"))] #[no_mangle] #[allow(dead_code)] pub extern "C" fn run_veilid_tools_tests() {