changed native library test to only x86

This commit is contained in:
Nathan Westfall 2017-08-31 22:50:01 -04:00
Родитель d9013148a0
Коммит fc8e48ef1f
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -166,7 +166,7 @@ namespace Xamarin.Android.Build.Tests
IsRelease = true,
};
proj.Packages.Add(KnownPackages.SQLitePCLRaw_Core);
proj.SetProperty(proj.ReleaseProperties, KnownProperties.AndroidSupportedAbis, "armeabi;x86");
proj.SetProperty(proj.ReleaseProperties, KnownProperties.AndroidSupportedAbis, "x86");
using (var b = CreateApkBuilder (Path.Combine ("temp", TestContext.CurrentContext.Test.Name))) {
b.Verbosity = Microsoft.Build.Framework.LoggerVerbosity.Diagnostic;
b.ThrowOnBuildFailure = false;
@ -174,8 +174,8 @@ namespace Xamarin.Android.Build.Tests
var apk = Path.Combine (Root, b.ProjectDirectory,
proj.IntermediateOutputPath, "android", "bin", "UnnamedProject.UnnamedProject.apk");
using (var zip = ZipHelper.OpenZip (apk)) {
var libFiles = zip.Where (x => x.FullName.StartsWith("lib"));
var abiPaths = new string[] { "lib/armeabi/", "lib/x86/" };
var libFiles = zip.Where (x => x.FullName.StartsWith("lib/") && !x.FullName.Equals("lib/", StringComparison.InvariantCultureIgnoreCase));
var abiPaths = new string[] { "lib/x86/" };
foreach (var file in libFiles)
Assert.IsTrue(abiPaths.Any (x => file.FullName.Contains (x)), $"Apk contains an unnesscary lib file: {file.FullName}");
}