diff --git a/docs/workflow/testing/libraries/testing-android.md b/docs/workflow/testing/libraries/testing-android.md
index 4c753f6832ce56..596d7851f1a8ed 100644
--- a/docs/workflow/testing/libraries/testing-android.md
+++ b/docs/workflow/testing/libraries/testing-android.md
@@ -46,15 +46,6 @@ mkdir ${ANDROID_SDK_ROOT} && unzip ~/asdk.zip -d ${ANDROID_SDK_ROOT}/cmdline-too
yes | ${ANDROID_SDK_ROOT}/cmdline-tools/tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --licenses
${ANDROID_SDK_ROOT}/cmdline-tools/tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} "platform-tools" "platforms;android-${SDK_API_LEVEL}" "build-tools;${SDK_BUILD_TOOLS}"
-# We also need to download precompiled binaries and headers for OpenSSL from maven, this step is a temporary hack
-# and will be removed once we figure out how to integrate OpenSSL properly as a dependency
-export ANDROID_OPENSSL_AAR=~/openssl-android
-curl https://maven.google.com/com/android/ndk/thirdparty/openssl/${OPENSSL_VER}/openssl-${OPENSSL_VER}.aar -L --output ~/openssl.zip
-unzip ~/openssl.zip -d ${ANDROID_OPENSSL_AAR} && rm -rf ~/openssl.zip
-printf "\n\nexport ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT}\nexport ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}\nexport ANDROID_OPENSSL_AAR=${ANDROID_OPENSSL_AAR}\n" >> ${BASHRC}
-```
-Save it to a file (e.g. `deps.sh`) and execute using `source` (e.g. `chmod +x deps.sh && source ./deps.sh`) in order to propogate the `ANDROID_NDK_ROOT`, `ANDROID_SDK_ROOT` and `ANDROID_OPENSSL_AAR` environment variables to the current process.
-
## Building Libs and Tests for Android
Now we're ready to build everything for Android:
diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh
index 1fdc2d3ba3a21d..b32774a68a7f07 100755
--- a/eng/install-native-dependencies.sh
+++ b/eng/install-native-dependencies.sh
@@ -46,19 +46,8 @@ elif [ "$1" = "OSX" ] || [ "$1" = "tvOS" ] || [ "$1" = "iOS" ]; then
if [ "$?" != "0" ]; then
exit 1;
fi
-elif [ "$1" = "Android" ]; then
- if [ -z "${ANDROID_OPENSSL_AAR}" ]; then
- echo "The ANDROID_OPENSSL_AAR variable is not set. OpenSSL will not be installed."
- exit 0;
- fi
- if [ -d "${ANDROID_OPENSSL_AAR}" ]; then
- exit 0;
- fi
- OPENSSL_VER=1.1.1g-alpha-1
- curl https://maven.google.com/com/android/ndk/thirdparty/openssl/${OPENSSL_VER}/openssl-${OPENSSL_VER}.aar -L --output /tmp/openssl.zip
- unzip /tmp/openssl.zip -d "${ANDROID_OPENSSL_AAR}" && rm -rf /tmp/openssl.zip
else
- echo "Must pass \"Linux\", \"Android\", \"tvOS\", \"iOS\" or \"OSX\" as first argument."
+ echo "Must pass \"Linux\", \"tvOS\", \"iOS\" or \"OSX\" as first argument."
exit 1
fi
diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml
index 3c4754e6ba273c..126cecfacaf05b 100644
--- a/eng/pipelines/common/global-build-job.yml
+++ b/eng/pipelines/common/global-build-job.yml
@@ -86,10 +86,6 @@ jobs:
${{ if ne(parameters.enableRichCodeNavigation, true) }}:
value: ''
- - ${{ if eq(parameters.osGroup, 'Android') }}:
- - name: ANDROID_OPENSSL_AAR
- value: /tmp/openssl-android
-
- ${{ each variable in parameters.variables }}:
- ${{ variable }}
@@ -108,7 +104,7 @@ jobs:
artifact: Mono_Offsets_${{monoCrossAOTTargetOS}}
path: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles'
- - ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS', 'Android') }}:
+ - ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }} ${{ parameters.archType }} azDO
displayName: Install Build Dependencies
diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml
index 97a34f7f33d029..01ee98adb01def 100644
--- a/eng/pipelines/runtime-staging.yml
+++ b/eng/pipelines/runtime-staging.yml
@@ -64,6 +64,7 @@ jobs:
buildConfig: Release
runtimeFlavor: mono
platforms:
+ - Android_x86
- Android_x64
- iOSSimulator_x64
variables:
@@ -133,6 +134,17 @@ jobs:
eq(variables['monoContainsChange'], true),
eq(variables['isFullMatrix'], true))
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/global-build-job.yml
+ buildConfig: Release
+ platforms:
+ - Android_arm
+ jobParameters:
+ testGroup: innerloop
+ nameSuffix: Build_Subset_Mono
+ buildArgs: -subset mono+libs
+
#
# Build the whole product using Mono and run libraries tests
#
@@ -252,34 +264,6 @@ jobs:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
-#
-# Build Mono and Libraries for Android using Android native crypto instead of OpenSSL
-#
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/common/global-build-job.yml
- buildConfig: Release
- runtimeFlavor: mono
- platforms:
- - Android_x64
- - Android_x86
- - Android_arm64
- variables:
- # disable using OpenSSL
- - name: ANDROID_OPENSSL_AAR
- value: ''
- # map dependencies variables to local variables
- - name: librariesContainsChange
- value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
- jobParameters:
- nameSuffix: Libraries_Mono_AndroidCrypto
- buildArgs: -s mono+libs -c $(_BuildConfig)
- timeoutInMinutes: 180
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
- eq(variables['isFullMatrix'], true))
-
# Run disabled installer tests on Linux x64
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml
index e0d5603cba234c..4819accff31f08 100644
--- a/eng/pipelines/runtime.yml
+++ b/eng/pipelines/runtime.yml
@@ -222,7 +222,6 @@ jobs:
buildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
runtimeFlavor: mono
platforms:
- - Android_x86
- MacCatalyst_x64
- MacCatalyst_arm64
- tvOSSimulator_x64
@@ -246,7 +245,6 @@ jobs:
buildConfig: Release
runtimeFlavor: mono
platforms:
- - Android_arm
- tvOS_arm64
- iOS_arm
- Linux_musl_x64
diff --git a/eng/testing/AndroidRunnerTemplate.sh b/eng/testing/AndroidRunnerTemplate.sh
index 0fd3a4a77c55a7..26698577798c1d 100644
--- a/eng/testing/AndroidRunnerTemplate.sh
+++ b/eng/testing/AndroidRunnerTemplate.sh
@@ -40,6 +40,7 @@ $HARNESS_RUNNER android test \
--package-name="net.dot.$ASSEMBLY_NAME" \
--app="$EXECUTION_DIR/bin/$TEST_NAME.apk" \
--output-directory="$XHARNESS_OUT" \
+ --timeout=1800 \
$EXPECTED_EXIT_CODE
_exitCode=$?
diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets
index dad68387f86b5a..d287996e15eeb6 100644
--- a/eng/testing/tests.mobile.targets
+++ b/eng/testing/tests.mobile.targets
@@ -68,13 +68,6 @@
-
-
-
GetIsRunningOnMonoInterpreter();
public static bool IsFreeBSD => RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD"));
public static bool IsNetBSD => RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD"));
- public static bool IsAndroid => RuntimeInformation.IsOSPlatform(OSPlatform.Create("Android"));
+ public static bool IsAndroid => RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID"));
public static bool IsiOS => RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS"));
public static bool IstvOS => RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS"));
public static bool IsMacCatalyst => RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST"));
diff --git a/src/libraries/Native/Unix/CMakeLists.txt b/src/libraries/Native/Unix/CMakeLists.txt
index fab7c06dfc3d1a..f47135fd8871c8 100644
--- a/src/libraries/Native/Unix/CMakeLists.txt
+++ b/src/libraries/Native/Unix/CMakeLists.txt
@@ -254,13 +254,8 @@ elseif(CLR_CMAKE_TARGET_TVOS)
#add_subdirectory(System.Net.Security.Native) # no gssapi on tvOS, see https://developer.apple.com/documentation/gss
# System.Security.Cryptography.Native is intentionally disabled on tvOS
# it is only used for interacting with OpenSSL which isn't useful there
-elseif(CLR_CMAKE_TARGET_ANDROID AND NOT CROSS_ROOTFS)
- #add_subdirectory(System.Net.Security.Native) # TODO: reenable
- if (NOT "$ENV{ANDROID_OPENSSL_AAR}" STREQUAL "")
- message("Using Android OpenSSL")
- set(PREFER_OPENSSL_ANDROID 1)
- add_subdirectory(System.Security.Cryptography.Native)
- endif()
+elseif(CLR_CMAKE_TARGET_ANDROID)
+ add_subdirectory(System.Security.Cryptography.Native.Android)
else()
add_subdirectory(System.Globalization.Native)
add_subdirectory(System.Net.Security.Native)
@@ -270,9 +265,3 @@ endif()
if(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
add_subdirectory(System.Security.Cryptography.Native.Apple)
endif()
-
-# if ANDROID_OPENSSL_AAR is not set - use Android Native Crypto (it's going to replace openssl eventually)
-if(CLR_CMAKE_TARGET_ANDROID AND NOT PREFER_OPENSSL_ANDROID)
- message("Using Android Native Crypto")
- add_subdirectory(System.Security.Cryptography.Native.Android)
-endif()
diff --git a/src/libraries/Native/Unix/System.Security.Cryptography.Native/extra_libs.cmake b/src/libraries/Native/Unix/System.Security.Cryptography.Native/extra_libs.cmake
index 5a0776577a98ac..3090da4e9d4121 100644
--- a/src/libraries/Native/Unix/System.Security.Cryptography.Native/extra_libs.cmake
+++ b/src/libraries/Native/Unix/System.Security.Cryptography.Native/extra_libs.cmake
@@ -3,28 +3,9 @@ macro(append_extra_cryptography_libs NativeLibsExtra)
if(CMAKE_STATIC_LIB_LINK)
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
endif(CMAKE_STATIC_LIB_LINK)
-
- if(CLR_CMAKE_TARGET_ANDROID AND NOT CROSS_ROOTFS)
- # TEMP: consume OpenSSL dependencies from external sources via env. variables
- set(OPENSSL_FOUND 1)
- set(OPENSSL_INCLUDE_DIR $ENV{ANDROID_OPENSSL_AAR}/prefab/modules/ssl/include)
- if(CLR_CMAKE_TARGET_ARCH_ARM64)
- set(OPENSSL_CRYPTO_LIBRARY $ENV{ANDROID_OPENSSL_AAR}/prefab/modules/crypto/libs/android.arm64-v8a/libcrypto.so)
- set(OPENSSL_SSL_LIBRARY $ENV{ANDROID_OPENSSL_AAR}/prefab/modules/ssl/libs/android.arm64-v8a/libssl.so)
- elseif(CLR_CMAKE_TARGET_ARCH_ARM)
- set(OPENSSL_CRYPTO_LIBRARY $ENV{ANDROID_OPENSSL_AAR}/prefab/modules/crypto/libs/android.armeabi-v7a/libcrypto.so)
- set(OPENSSL_SSL_LIBRARY $ENV{ANDROID_OPENSSL_AAR}/prefab/modules/ssl/libs/android.armeabi-v7a/libssl.so)
- elseif(CLR_CMAKE_TARGET_ARCH_I386)
- set(OPENSSL_CRYPTO_LIBRARY $ENV{ANDROID_OPENSSL_AAR}/prefab/modules/crypto/libs/android.x86/libcrypto.so)
- set(OPENSSL_SSL_LIBRARY $ENV{ANDROID_OPENSSL_AAR}/prefab/modules/ssl/libs/android.x86/libssl.so)
- else()
- set(OPENSSL_CRYPTO_LIBRARY $ENV{ANDROID_OPENSSL_AAR}/prefab/modules/crypto/libs/android.x86_64/libcrypto.so)
- set(OPENSSL_SSL_LIBRARY $ENV{ANDROID_OPENSSL_AAR}/prefab/modules/ssl/libs/android.x86_64/libssl.so)
- endif()
- else()
- find_package(OpenSSL)
- endif()
-
+
+ find_package(OpenSSL)
+
if(NOT OPENSSL_FOUND)
message(FATAL_ERROR "!!! Cannot find libssl and System.Security.Cryptography.Native cannot build without it. Try installing libssl-dev (on Linux, but this may vary by distro) or openssl (on macOS) !!!. See the requirements document for your specific operating system: https://github.com/dotnet/runtime/tree/main/docs/workflow/requirements.")
endif(NOT OPENSSL_FOUND)
diff --git a/src/libraries/System.Collections.Immutable/tests/ImmutableArrayTest.cs b/src/libraries/System.Collections.Immutable/tests/ImmutableArrayTest.cs
index 7349cefa67b5c3..14a42fba179564 100644
--- a/src/libraries/System.Collections.Immutable/tests/ImmutableArrayTest.cs
+++ b/src/libraries/System.Collections.Immutable/tests/ImmutableArrayTest.cs
@@ -1984,6 +1984,7 @@ public void IStructuralEquatableEqualsNullComparerInvalid()
[Theory]
[MemberData(nameof(IStructuralEquatableGetHashCodeData))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/37069", TestPlatforms.Android)]
public void IStructuralEquatableGetHashCode(IEnumerable source, IEqualityComparer comparer)
{
var array = source.ToImmutableArray();
diff --git a/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveComparerTests.cs b/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveComparerTests.cs
index 6a0428686cb38a..14261e4c8c031c 100644
--- a/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveComparerTests.cs
+++ b/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveComparerTests.cs
@@ -65,6 +65,7 @@ public void Ctor_CultureInfo_Compare(object a, object b, int expected)
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/37069", TestPlatforms.Android)]
public void Ctor_CultureInfo_Compare_TurkishI()
{
var cultureNames = Helpers.TestCultureNames;
diff --git a/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveHashCodeProviderTests.cs b/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveHashCodeProviderTests.cs
index f41a9225e02468..e9120f915aaf3d 100644
--- a/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveHashCodeProviderTests.cs
+++ b/src/libraries/System.Collections.NonGeneric/tests/CaseInsensitiveHashCodeProviderTests.cs
@@ -95,6 +95,7 @@ public void Ctor_CultureInfo_ChangeCurrentCulture_GetHashCodeCompare(object a, o
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/37069", TestPlatforms.Android)]
public void Ctor_CultureInfo_GetHashCodeCompare_TurkishI()
{
var cultureNames = Helpers.TestCultureNames;
@@ -150,6 +151,7 @@ public void Default_GetHashCodeCompare(object a, object b, bool expected)
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/37069", TestPlatforms.Android)]
public void Default_Compare_TurkishI()
{
// Turkish has lower-case and upper-case version of the dotted "i", so the upper case of "i" (U+0069) isn't "I" (U+0049)
diff --git a/src/libraries/System.IO.Compression/tests/CompressionStreamUnitTests.Deflate.cs b/src/libraries/System.IO.Compression/tests/CompressionStreamUnitTests.Deflate.cs
index 2cdf0224710dd8..4feaee51111be1 100644
--- a/src/libraries/System.IO.Compression/tests/CompressionStreamUnitTests.Deflate.cs
+++ b/src/libraries/System.IO.Compression/tests/CompressionStreamUnitTests.Deflate.cs
@@ -30,6 +30,7 @@ public static IEnumerable