Skip to content

Commit cf191a6

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 a638773 commit cf191a6

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
@@ -732,9 +732,9 @@ public void BuildMkBundleApplicationReleaseAllAbi ()
732732
[Test]
733733
[TestCaseSource (nameof (AotChecks))]
734734
[Category ("Minor")]
735-
public void BuildAotApplication (string supportedAbis, bool enableLLVM, bool expectedResult)
735+
public void BuildAotApplicationAndÜmläüts (string supportedAbis, bool enableLLVM, bool expectedResult)
736736
{
737-
var path = Path.Combine ("temp", string.Format ("BuildAotApplication_{0}_{1}_{2}", supportedAbis, enableLLVM, expectedResult));
737+
var path = Path.Combine ("temp", string.Format ("BuildAotApplication AndÜmläüts_{0}_{1}_{2}", supportedAbis, enableLLVM, expectedResult));
738738
var proj = new XamarinAndroidApplicationProject () {
739739
IsRelease = true,
740740
BundleAssemblies = false,
@@ -768,7 +768,7 @@ public void BuildAotApplication (string supportedAbis, bool enableLLVM, bool exp
768768
// LLVM passes a direct path to libc.so, and we need to use the libc.so
769769
// which corresponds to the *minimum* SDK version specified in AndroidManifest.xml
770770
// Since we overrode minSdkVersion=16, that means we should use libc.so from android-16.
771-
var rightLibc = new Regex (@"^\s*\[AOT\].*cross-.*--llvm.*,ld-flags=.*android-16.arch-.*.usr.lib.libc\.so", RegexOptions.Multiline);
771+
var rightLibc = new Regex (@"\s*\[aot-compiler stdout].*android-16.arch-.*.usr.lib.libc\.so", RegexOptions.Multiline);
772772
var m = rightLibc.Match (string.Join ("\n",b.LastBuildOutput));
773773
Assert.IsTrue (m.Success, "AOT+LLVM should use libc.so from minSdkVersion!");
774774
}
@@ -803,9 +803,9 @@ public void BuildAotApplication (string supportedAbis, bool enableLLVM, bool exp
803803
[Test]
804804
[TestCaseSource (nameof (AotChecks))]
805805
[Category ("Minor")]
806-
public void BuildAotApplicationAndBundle (string supportedAbis, bool enableLLVM, bool expectedResult)
806+
public void BuildAotApplicationAndBundleAndÜmläüts (string supportedAbis, bool enableLLVM, bool expectedResult)
807807
{
808-
var path = Path.Combine ("temp", string.Format ("BuildAotApplicationAndBundle_{0}_{1}_{2}", supportedAbis, enableLLVM, expectedResult));
808+
var path = Path.Combine ("temp", string.Format ("BuildAotApplicationAndBundle AndÜmläüts_{0}_{1}_{2}", supportedAbis, enableLLVM, expectedResult));
809809
var proj = new XamarinAndroidApplicationProject () {
810810
IsRelease = true,
811811
BundleAssemblies = true,

0 commit comments

Comments
 (0)