Skip to content

Commit 3454de1

Browse files
committed
[Xamarin.Android.Build.Tasks] Add new Unit test for AOT
Our AOT system needs to work when a user uses non ASCII characters and spaces. This commit updates our `BuildAotApplication` unit test to use both spaces and UTF8 based characters. This will make sure that in future versions of mono we do not regress supporting those kinds of paths.
1 parent c2aadba commit 3454de1

File tree

1 file changed

+5
-5
lines changed
  • src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests

1 file changed

+5
-5
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -711,9 +711,9 @@ public void BuildMkBundleApplicationReleaseAllAbi ()
711711
[Test]
712712
[TestCaseSource (nameof (AotChecks))]
713713
[Category ("Minor")]
714-
public void BuildAotApplication (string supportedAbis, bool enableLLVM, bool expectedResult)
714+
public void BuildAotApplicationAndÜmläüts (string supportedAbis, bool enableLLVM, bool expectedResult)
715715
{
716-
var path = Path.Combine ("temp", string.Format ("BuildAotApplication_{0}_{1}_{2}", supportedAbis, enableLLVM, expectedResult));
716+
var path = Path.Combine ("temp", string.Format ("BuildAotApplication AndÜmläüts_{0}_{1}_{2}", supportedAbis, enableLLVM, expectedResult));
717717
var proj = new XamarinAndroidApplicationProject () {
718718
IsRelease = true,
719719
BundleAssemblies = false,
@@ -747,7 +747,7 @@ public void BuildAotApplication (string supportedAbis, bool enableLLVM, bool exp
747747
// LLVM passes a direct path to libc.so, and we need to use the libc.so
748748
// which corresponds to the *minimum* SDK version specified in AndroidManifest.xml
749749
// Since we overrode minSdkVersion=16, that means we should use libc.so from android-16.
750-
var rightLibc = new Regex (@"^\s*\[AOT\].*cross-.*--llvm.*,ld-flags=.*android-16.arch-.*.usr.lib.libc\.so", RegexOptions.Multiline);
750+
var rightLibc = new Regex (@"\s*\[aot-compiler stdout].*android-16.arch-.*.usr.lib.libc\.so", RegexOptions.Multiline);
751751
var m = rightLibc.Match (string.Join ("\n",b.LastBuildOutput));
752752
Assert.IsTrue (m.Success, "AOT+LLVM should use libc.so from minSdkVersion!");
753753
}
@@ -782,9 +782,9 @@ public void BuildAotApplication (string supportedAbis, bool enableLLVM, bool exp
782782
[Test]
783783
[TestCaseSource (nameof (AotChecks))]
784784
[Category ("Minor")]
785-
public void BuildAotApplicationAndBundle (string supportedAbis, bool enableLLVM, bool expectedResult)
785+
public void BuildAotApplicationAndBundleAndÜmläüts (string supportedAbis, bool enableLLVM, bool expectedResult)
786786
{
787-
var path = Path.Combine ("temp", string.Format ("BuildAotApplicationAndBundle_{0}_{1}_{2}", supportedAbis, enableLLVM, expectedResult));
787+
var path = Path.Combine ("temp", string.Format ("BuildAotApplicationAndBundle AndÜmläüts_{0}_{1}_{2}", supportedAbis, enableLLVM, expectedResult));
788788
var proj = new XamarinAndroidApplicationProject () {
789789
IsRelease = true,
790790
BundleAssemblies = true,

0 commit comments

Comments
 (0)