Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extraction of Xamarin.Build.Download #1048

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,34 @@ public void TestGMapsDownload ()
Assert.True (File.Exists (Path.Combine (unpackDir, "GMaps-1.11.1", "CHANGELOG")));
}

[Fact]
public void TestGoogleAppMeasurementDownload ()
{
var engine = new ProjectCollection ();
var prel = ProjectRootElement.Create (Path.Combine (TempDir , "project.csproj") , engine);

var unpackDir = GetTempPath ("unpacked");
prel.SetProperty ("XamarinBuildDownloadDir" , unpackDir);

prel.AddItem (
"XamarinBuildDownload" , "GAppM-10.28.0" , new Dictionary<string , string> {
{ "Url", "https://dl.google.com/firebase/ios/analytics/4d5ec9a36b6d4fd4/GoogleAppMeasurement-10.28.0.tar.gz" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we'll need to move this test data somewhere else.

{ "Kind", "Tgz" }
});

AddCoreTargets (prel);

var project = new ProjectInstance (prel);
var log = new MSBuildTestLogger ();

var success = BuildProject (engine , project , "_XamarinBuildDownload" , log);

AssertNoMessagesOrWarnings (log , DEFAULT_IGNORE_PATTERNS);
Assert.True (success);

Assert.True (File.Exists (Path.Combine (unpackDir , "GAppM-10.28.0" , "GoogleAppMeasurement-10.28.0" , "dummy.txt")));
}

[Fact]
public void TestCastAssemblyResources ()
{
Expand Down Expand Up @@ -727,4 +755,4 @@ public void TestPathGreaterThan260Chars ()
Assert.True (File.Exists (Path.Combine (unpackDir, "GAppM-8.8.0", "GoogleAppMeasurement-8.8.0", "dummy.txt")));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<PackageId>Xamarin.Build.Download</PackageId>
<Title>Xamarin Build-time Download Support</Title>
<PackageVersion>0.11.4</PackageVersion>
<PackageVersion>0.12.0</PackageVersion>
<Authors>Microsoft</Authors>
<Owners>Microsoft</Owners>
<PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=865061</PackageProjectUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ static ProcessArgumentBuilder Build7ZipExtractionArgs (string file, string conte
if (ignoreTarSymLinks)
args.Add ("-snl-");

// Add the "-y" parameter to automatically confirm all overwrite operations to avoid the iOS build task hanging forever.
args.Add ("-y");

args.AddQuoted ("-o" + contentDir);
args.AddQuoted (file);
return args;
Expand Down