8000 Upgrade development dependencies by nulltoken · Pull Request #1138 · libgit2/libgit2sharp · GitHub
[go: up one dir, main page]

Skip to content

Upgrade development dependencies #1138

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

Merged
merged 2 commits into from
Jul 4, 2015
Merged
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
3 changes: 2 additions & 1 deletion .nuget/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="xunit.runners" version="1.9.2" />
<package id="xunit.runner.console" version="2.0.0" />
<package id="xunit.runner.msbuild" version="2.0.0" />
</packages>
4 changes: 2 additions & 2 deletions CI/build.msbuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<DeployFolder>$(RootDir)\Build</DeployFolder>
</PropertyGroup>

<UsingTask AssemblyFile="$(RootDir)\packages\xunit.runners.1.9.2\tools\xunit.runner.msbuild.dll"
<UsingTask AssemblyFile="$(RootDir)\packages\xunit.runner.msbuild.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.runner.msbuild.dll"
TaskName="Xunit.Runner.MSBuild.xunit" />
<Target Name="Clean">
<Message Text="Commit SHA = $(CommitSha)" />
Expand Down Expand Up @@ -37,7 +37,7 @@
</Target>

<Target Name="Test" DependsOnTargets="Build">
<xunit Assembly="$(TestBuildDir)/LibGit2Sharp.Tests.dll" ShadowCopy="false" Xml="$(DeployFolder)/Test-result.xml" />
<xunit Assemblies="$(TestBuildDir)/LibGit2Sharp.Tests.dll" ShadowCopy="false" Xml="$(DeployFolder)/Test-result.xml" />
</Target>

<Target Name="Deploy" DependsOnTargets="Test">
Expand Down
Binary file modified Lib/NuGet/NuGet.exe
Binary file not shown.
11 changes: 5 additions & 6 deletions LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\xunit.runner.visualstudio.2.0.0-rc1-build1030\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.0.0-rc1-build1030\build\net20\xunit.runner.visualstudio.props')" />
<Import Project="..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down Expand Up @@ -35,9 +35,8 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="Moq, Version=4.2.1409.1722, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll</HintPath>
<Reference Include="Moq, Version=4.2.1507.118, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.2.1507.0118\lib\net40\Moq.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -158,7 +157,7 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.0.0-rc1-build1030\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.0.0-rc1-build1030\build\net20\xunit.runner.visualstudio.props'))" />
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand All @@ -167,4 +166,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
4 changes: 3 additions & 1 deletion LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ private static void SetUpTestEnvironment()
{
IsFileSystemCaseSensitive = IsFileSystemCaseSensitiveInternal();

string initialAssemblyParentFolder = Directory.GetParent(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath).FullName;
Copy link
Member Author

Choose a reason for hiding this comment

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

/cc @cmn @bording @Therzok This change somehow bit me in the back. During the last hour I've randomly seen passing/failing build runs on Travis due to this. Any idea? 🙏

Latest failure is at https://travis-ci.org/libgit2/libgit2sharp/jobs/69555887

Copy link
Member

Choose a reason for hiding this comment

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

There are so many parts here that have changed in a short period of time, I'm not sure where to start!

@nulltoken In addition to the xunit 2.0 changes here, I see that you've also bumped up to a NativeBinaries package that includes the changes I made there recently, and it also has a new libgit2 version along with my changes.

Any idea when the failures started? Before or after the new NativeBinaries update?

Copy link
Member

Choose a reason for hiding this comment

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

The problems come from the fixture not being able to find the resources path. It ends up deleting two components from the path, which indicates that it's taking the source dir path instead of where the dll is located as the first path.

Copy link
Member Author

Choose a reason for hiding this comment

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

This started strangely with this very PR. Before the merge, everything was green. Once merge vNext failed on Travis/Mac with the same mangled path error. I restarted the build and... It passed. In the native binaries PR, I've tried to change the way the assembly location was identified. This seemed to be working.... Until this one. It looks like everything is related to xUnit shadow copying. IIRC you introduced this because of an issue I cannot remember of.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, I think I've figured out what's going on here. PR with more details coming soon!

Copy link
Member Author

Choose a reason for hiding this comment

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

❤️


const string sourceRelativePath = @"../../Resources";
ResourcesDirectory = new DirectoryInfo(sourceRelativePath);
ResourcesDirectory = new DirectoryInfo(Path.Combine(initialAssemblyParentFolder, sourceRelativePath));

// Setup standard paths to our test repositories
BareTestRepoPath = Path.Combine(sourceRelativePath, "testrepo.git");
Expand Down
6 changes: 3 additions & 3 deletions LibGit2Sharp.Tests/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Moq" version="4.2.1409.1722" targetFramework="net40" />
<package id="Moq" version="4.2.1507.0118" targetFramework="net40" />
<package id="xunit" version="1.9.2" targetFramework="net40" />
<package id="xunit.extensions" version="1.9.2" targetFramework="net40" />
<package id="xunit.runner.visualstudio" version="2.0.0-rc1-build1030" targetFramework="net40" />
<package id="xunit.runner.visualstudio" version="2.0.0" targetFramework="net40" />
</packages>
11 changes: 6 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ environment:
secure: eGVilNg1Yuq+Xj+SW8r3WCtjnzhoDV0sNJkma4NRq7A=
version : 0.22.0
matrix:
- xunit_runner: xunit.console.clr4.x86.exe
- xunit_runner: xunit.console.x86.exe
Arch: 32
publish_on_success: False
- xunit_runner: xunit.console.clr4.exe
- xunit_runner: xunit.console.exe
Arch: 64
publish_on_success: True

Expand Down Expand Up @@ -112,15 +112,16 @@ test_script:
{
.\packages\OpenCover\OpenCover.Console.exe `
-register:user `
-target:$Env:xunit_runner `
"-targetargs:""$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.Tests\bin\Release\LibGit2Sharp.Tests.dll"" /noshadow /appveyor" `
"-target:""$Env:APPVEYOR_BUILD_FOLDER\packages\xunit.runner.console.2.0.0\tools\$Env:xunit_runner""" `
"-targetargs:""$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.Tests\bin\Release\LibGit2Sharp.Tests.dll"" -noshadow" `
"-filter:+[LibGit2Sharp]* -[LibGit2Sharp.Tests]*" `
-hideskipped:All `
-output:opencoverCoverage.xml
}
ElseIf ($Env:SHOULD_RUN_COVERITY_ANALYSIS -eq $False)
{
& "$Env:xunit_runner" "$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.Tests\bin\Release\LibGit2Sharp.Tests.dll" /appveyor
& "$Env:APPVEYOR_BUILD_FOLDER\packages\xunit.runner.console.2.0.0\tools\$Env:xunit_runner" `
"$Env:APPVEYOR_BUILD_FOLDER\LibGit2Sharp.Tests\bin\Release\LibGit2Sharp.Tests.dll" -noshadow
}

after_test:
Expand Down
0