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

[CI] Revert to running .NET Standard Engine Tests via NUnitLite #779

Merged
merged 1 commit into from
Jun 7, 2020
Merged
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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions NUnitConsole.sln
Original file line number Diff line number Diff line change
@@ -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
@@ -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
7 changes: 7 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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
@@ -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
11 changes: 7 additions & 4 deletions build.cake
Original file line number Diff line number Diff line change
@@ -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);
}
@@ -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);
}
@@ -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(