-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable build on Linux and fix test execution on Linux (#1784)
* Add .NET Framework Assembly References to Build Properties * Add Linux and MacOS to build pipeline * fix build pipeline * Update to new .NET Core preview + fix Linux build * fix Manifest name * Update nuget.config * Update nuget version * remove MacOS from build pipeline * Fix some Runtime Tests for Linux * Fix tests with windows-only paths under linux * fix tests for net471 * fix tests for netcoreapp2.1 * Refactor Skip condition in UriValueRetriever * Fix Generator Tests for Linux * Fix Runtime Test Unit Test Provider Configuration * Adapt Specs to .Net Core (for Linux) * Refactor OS check + build Specs in .Net Core only * update parameter from '/' to '-' * add newline at end of build.ps1 * update Submodule * fix build * Update Specs .net core version to 3.0 * fix path to end with netcoreapp3.0 * update submodule * update build and add Dockerfile * update submodule * use dotnet instead of msbuild and vstest * update submodule * update build * fix dependencies of MSBuildSdkIntegrationTests and Specs * update submodule * update Dockerfile * update submodule * use dotnet build instead of msbuild per default * update submodule * fix typo from submodule * adapt build.ps1 * replace dash with slash * fix MSBuild command-line property * remove old msbuild search and wrap appInsightsInstrumentationKey in quotes * update submodule * refactor scenario * refactor compilation * update submodule * refactor to using new drivers * update submodule * update submodule * update Dockerfile * update submodule * update MultiFeatureGenerator to generate tests for .NET Core 2.1 only on Windows * add output of dotnet build command * wrap value in quotes * fix build script for windows * reformat code * include dotsettings in solution * fix typo * make MSBuildProjectReader non-static with interface * make GeneratorContainerBuilder non-static * reformat code * use Result objects in analytics transmission * refactor GenerateFeatureFileCodeBehindTask into smaller classes * fix missing injection * update submodule * add abbreviations to dotsettings * update base docker image * make AssemblyHooks classes public * fix whitespaces * use CreateSpecFlowProject for step * update submodule * derive generated test class explicitly from object * update name of isInterface field * update submodule * update submodule * add RuntimeInformationProvider to specs * update wording * refactor steps for build systems * refactor LanguageSupport.feature * refactor MultipleSpecsProjects * fix backslash * adapt rules to use var when evident * use var * use Array.Empty * work on PR feedback * change async in analytics transmission * make tests async
- Loading branch information
1 parent
f125534
commit b6c4d72
Showing
105 changed files
with
1,452 additions
and
1,009 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM mcr.microsoft.com/dotnet/core/sdk:3.0.101-buster | ||
|
||
RUN apt update \ | ||
&& apt install -y git mono-complete \ | ||
&& dotnet tool install --global PowerShell | ||
|
||
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ | ||
&& dpkg -i packages-microsoft-prod.deb \ | ||
&& apt update \ | ||
&& apt install apt-transport-https -y \ | ||
&& apt update | ||
RUN apt install dotnet-sdk-2.1 -y | ||
|
||
# RUN git clone --recurse-submodules--single-branch --branch updateLinuxBuild -j8 https://github.com/techtalk/SpecFlow.git /src \ | ||
# && ls -la | ||
|
||
WORKDIR /src | ||
|
||
COPY . . | ||
|
||
RUN git clean -fdx | ||
|
||
# build project | ||
# RUN pwsh /src/build.ps1 | ||
|
||
RUN pwsh /src/build.ps1 | ||
|
||
#CMD /bin/sh | ||
# CMD dotnet test /src/*.sln -v n --no-build --logger "trx;LogFileName=TestResults.trx" | ||
# CMD dotnet test ./Tests/TechTalk.SpecFlow.Specs/TechTalk.SpecFlow.Specs.csproj -v n --no-build --logger "trx;LogFileName=TestResults.trx" --filter "BasicScenarioExecutionFeature_MSTest" | ||
# CMD dotnet test TechTalk.SpecFlow.sln -v n --no-build --logger "trx;LogFileName=TestResults.trx" --filter "BasicScenarioExecutionFeature_MSTest" && /bin/sh | ||
CMD /bin/sh |
Submodule SpecFlow.TestProjectGenerator
updated
from 91de50 to c20c21
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
SpecFlow.Tools.MsBuild.Generation/AssemblyResolveLogger.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System; | ||
using System.Reflection; | ||
|
||
namespace SpecFlow.Tools.MsBuild.Generation | ||
{ | ||
public sealed class AssemblyResolveLogger : IAssemblyResolveLogger | ||
{ | ||
private readonly ITaskLoggingWrapper _taskLoggingWrapper; | ||
private bool _isDisposed; | ||
|
||
public AssemblyResolveLogger(ITaskLoggingWrapper taskLoggingWrapper) | ||
{ | ||
_taskLoggingWrapper = taskLoggingWrapper; | ||
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; | ||
} | ||
|
||
~AssemblyResolveLogger() | ||
{ | ||
Dispose(false); | ||
} | ||
|
||
public Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) | ||
{ | ||
_taskLoggingWrapper.LogMessage(args.Name); | ||
|
||
return null; | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
Dispose(true); | ||
GC.SuppressFinalize(this); | ||
} | ||
|
||
private void Dispose(bool disposing) | ||
{ | ||
if (_isDisposed) | ||
{ | ||
return; | ||
} | ||
|
||
if (disposing) | ||
{ | ||
AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve; | ||
} | ||
|
||
_isDisposed = true; | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
SpecFlow.Tools.MsBuild.Generation/AssemblyResolveLoggerFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace SpecFlow.Tools.MsBuild.Generation | ||
{ | ||
public class AssemblyResolveLoggerFactory : IAssemblyResolveLoggerFactory | ||
{ | ||
private readonly ITaskLoggingWrapper _taskLoggingWrapper; | ||
|
||
public AssemblyResolveLoggerFactory(ITaskLoggingWrapper taskLoggingWrapper) | ||
{ | ||
_taskLoggingWrapper = taskLoggingWrapper; | ||
} | ||
|
||
public IAssemblyResolveLogger Build() | ||
{ | ||
return new AssemblyResolveLogger(_taskLoggingWrapper); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.IO; | ||
|
||
namespace SpecFlow.Tools.MsBuild.Generation | ||
{ | ||
public class ExceptionTaskLogger : IExceptionTaskLogger | ||
{ | ||
private readonly ITaskLoggingWrapper _taskLoggingWrapper; | ||
|
||
public ExceptionTaskLogger(ITaskLoggingWrapper taskLoggingWrapper) | ||
{ | ||
_taskLoggingWrapper = taskLoggingWrapper; | ||
} | ||
|
||
public void LogException(Exception exception) | ||
{ | ||
if (exception.InnerException is FileLoadException fileLoadException) | ||
{ | ||
_taskLoggingWrapper.LogError($"FileLoadException Filename: {fileLoadException.FileName}"); | ||
_taskLoggingWrapper.LogError($"FileLoadException FusionLog: {fileLoadException.FusionLog}"); | ||
_taskLoggingWrapper.LogError($"FileLoadException Message: {fileLoadException.Message}"); | ||
} | ||
|
||
if (exception.InnerException is Exception innerException) | ||
{ | ||
_taskLoggingWrapper.LogError(innerException.ToString()); | ||
} | ||
|
||
_taskLoggingWrapper.LogError(exception.ToString()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.