Skip to content

Commit

Permalink
Merge pull request #779 from nunit/engine-test-fix
Browse files Browse the repository at this point in the history
[CI] Revert to running .NET Standard Engine Tests via NUnitLite
  • Loading branch information
ChrisMaddock committed Jun 7, 2020
2 parents 634926d + 924848c commit 19b4239
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -12,6 +12,7 @@ matrix:
- sudo dpkg -i packages-microsoft-prod.deb
- sudo apt-get install apt-transport-https
- sudo apt-get update
- sudo apt-get install dotnet-sharedframework-microsoft.netcore.app-1.1.2
- sudo apt-get install dotnet-sdk-2.2

# macOS package restore currently taking >30 mins on Travis
Expand Down
5 changes: 3 additions & 2 deletions NUnitConsole.sln
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2002
# Visual Studio Version 16
VisualStudioVersion = 16.0.29728.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.gitignore = .gitignore
.travis.yml = .travis.yml
appveyor.yml = appveyor.yml
azure-pipelines.yml = azure-pipelines.yml
build.cake = build.cake
BUILDING.md = BUILDING.md
CHANGES.txt = CHANGES.txt
Expand Down
7 changes: 7 additions & 0 deletions azure-pipelines.yml
Expand Up @@ -58,6 +58,7 @@ jobs:
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sharedframework-microsoft.netcore.app-1.1.2
sudo apt-get install dotnet-sdk-2.2
./build.sh --target=Test --configuration=Release
displayName: Build and test
Expand Down Expand Up @@ -104,6 +105,12 @@ jobs:
packageType: runtime
version: 2.1.x

- task: UseDotNet@2
displayName: 'Install .NET Core runtime 1.1'
inputs:
packageType: runtime
version: 1.1.x

- bash: |
dotnet tool install --global Cake.Tool
dotnet cake --target=Test --configuration=Release
Expand Down
11 changes: 7 additions & 4 deletions build.cake
Expand Up @@ -318,9 +318,8 @@ Task("TestNetStandard16Engine")
if (IsDotNetCoreInstalled)
{
RunDotnetCoreTests(
NETCORE21_CONSOLE,
NETCOREAPP11_BIN_DIR + ENGINE_TESTS,
NETCOREAPP11_BIN_DIR,
ENGINE_TESTS,
"netcoreapp1.1",
ref ErrorDetail);
}
Expand All @@ -343,9 +342,8 @@ Task("TestNetStandard20Engine")
if (IsDotNetCoreInstalled)
{
RunDotnetCoreTests(
NETCORE21_CONSOLE,
NETCOREAPP21_BIN_DIR + ENGINE_TESTS,
NETCOREAPP21_BIN_DIR,
ENGINE_TESTS,
"netcoreapp2.1",
ref ErrorDetail);
}
Expand Down Expand Up @@ -694,6 +692,11 @@ void RunTest(FilePath exePath, DirectoryPath workingDir, string testAssembly, st
errorDetail.Add(string.Format("{0} returned rc = {1}", exePath, rc));
}

void RunDotnetCoreTests(FilePath exePath, DirectoryPath workingDir, string framework, ref List<string> errorDetail)
{
RunDotnetCoreTests(exePath, workingDir, arguments: null, framework, ref errorDetail);
}

void RunDotnetCoreTests(FilePath exePath, DirectoryPath workingDir, string arguments, string framework, ref List<string> errorDetail)
{
int rc = StartProcess(
Expand Down

0 comments on commit 19b4239

Please sign in to comment.