Skip to content

Commit

Permalink
[WIP] Adjust a test to work for NET6 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
grendello committed Mar 2, 2021
1 parent 7c51d47 commit dc8b730
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class Builder : IDisposable
const string SigSegvError = "Got a SIGSEGV while executing native code";
const string ConsoleLoggerError = "[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: is negative";

string Arm32AbiDir => UseDotNet ? "armeabi-v7a-net6" : "armeabi-v7a";

/// <summary>
/// If true, use `dotnet build` and IShortFormProject throughout the tests
/// </summary>
Expand Down Expand Up @@ -80,7 +82,7 @@ public string BuildOutputDirectory {
get {
var outdir = Environment.GetEnvironmentVariable ("XA_BUILD_OUTPUT_PATH");
string configuration = Environment.GetEnvironmentVariable ("CONFIGURATION") ?? XABuildPaths.Configuration;
var libmonodroidPath = Path.Combine ("lib", "xamarin.android", "xbuild", "Xamarin", "Android", "lib", "armeabi-v7a", "libmono-android.release.so");
var libmonodroidPath = Path.Combine ("lib", "xamarin.android", "xbuild", "Xamarin", "Android", "lib", Arm32AbiDir, "libmono-android.release.so");
if (String.IsNullOrEmpty(outdir))
outdir = Path.GetFullPath (Path.Combine (Root, "..", "..", "..", "..", "..", "..", "..", "out"));
if (!Directory.Exists (Path.Combine (outdir, "lib")) || !File.Exists (Path.Combine (outdir, libmonodroidPath)))
Expand All @@ -105,7 +107,7 @@ public string BuildOutputDirectory {
public string AndroidMSBuildDirectory {
get {
var msbuildDir = Path.Combine (BuildOutputDirectory, "lib", "xamarin.android", "xbuild", "Xamarin", "Android");
if (Directory.Exists (msbuildDir) && File.Exists (Path.Combine (msbuildDir, "lib", "armeabi-v7a", "libmono-android.release.so")))
if (Directory.Exists (msbuildDir) && File.Exists (Path.Combine (msbuildDir, "lib", Arm32AbiDir, "libmono-android.release.so")))
return msbuildDir;

return TestEnvironment.MonoAndroidToolsDirectory;
Expand Down

0 comments on commit dc8b730

Please sign in to comment.