more test work
@@ -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")
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
./adb+.sh uninstall com.veilid.veilid_tools_android_tests
|
||||
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
./adb+.sh uninstall com.veilid.veilidtools.veilidtools_android_tests
|
||||
|
@@ -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 */
|
||||
|
||||
|
@@ -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() {
|
||||
|