Repository: lucenenet
Updated Branches:
  refs/heads/master 06b676ec8 -> caa61a37d


build/build.ps1: Enabling NUnit3 Console for .NET Framework because of test 
failures that occur in the .NET Core SDK that don't happen in Visual Studio. 
Assuming .NET Core SDK is not stable/not very well tested against .NET 
Framework 4.5.1.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/cb256489
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/cb256489
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/cb256489

Branch: refs/heads/master
Commit: cb25648961bc3d391a4c664b49e811e4c5242b28
Parents: 06b676e
Author: Shad Storhaug <[email protected]>
Authored: Mon Sep 18 16:14:28 2017 +0700
Committer: Shad Storhaug <[email protected]>
Committed: Mon Sep 18 22:58:37 2017 +0700

----------------------------------------------------------------------
 build/build.ps1 | 48 ++++++++++++++++++++++++++----------------------
 1 file changed, 26 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cb256489/build/build.ps1
----------------------------------------------------------------------
diff --git a/build/build.ps1 b/build/build.ps1
index 2f83e75..124614a 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -263,7 +263,7 @@ task Test -depends InstallSDK1IfRequired, 
InstallSDK2IfRequired, Restore -descri
                        $testResultDirectory = 
"$test_results_directory\$framework\$testName"
                        Ensure-Directory-Exists $testResultDirectory
 
-                       #if ($framework.StartsWith("netcore")) {
+                       if ($framework.StartsWith("netcore")) {
                                $testExpression = "dotnet.exe test $testProject 
--configuration $configuration --framework $framework --no-build"
                                #if ($framework -ne "netcoreapp1.0") {
                                        $testExpression = "$testExpression 
--no-restore"
@@ -273,27 +273,31 @@ task Test -depends InstallSDK1IfRequired, 
InstallSDK2IfRequired, Restore -descri
                                if ($where -ne $null -and (-Not 
[System.String]::IsNullOrEmpty($where))) {
                                        $testExpression = "$testExpression 
--filter $where"
                                }
-                       #} else {
-                       #       $projectDirectory = $testProject.DirectoryName
-                       #       Write-Host "Directory: $projectDirectory" 
-ForegroundColor Green
-
-                       #       $binaryRoot = 
"$projectDirectory\bin\$configuration\$framework"
-
-                       #       $testBinary = 
"$binaryRoot\win7-x64\$testName.dll"
-                       #       if (-not (Test-Path $testBinary)) {
-                       #               $testBinary = 
"$binaryRoot\win7-x32\$testName.dll"
-                       #       }
-                       #       if (-not (Test-Path $testBinary)) {
-                       #               $testBinary = 
"$binaryRoot\$testName.dll"
-                       #       } 
-
-                       #       $testExpression = 
"$tools_directory\NUnit\NUnit.ConsoleRunner.3.5.0\tools\nunit3-console.exe 
$testBinary --teamcity"
-                       #       $testExpression = "$testExpression 
--result:$testResultDirectory\TestResult.xml"
-
-                       #       if ($where -ne $null -and (-Not 
[System.String]::IsNullOrEmpty($where))) {
-                       #               $testExpression = "$testExpression 
--where=$where"
-                       #       }
-                       #}
+                       } else {
+                               # NOTE: Tried to use dotnet.exe to test .NET 
Framework, but it produces different test results
+                               # (more failures). These failures don't show up 
in Visual Studio. So the assumption is that
+                               # since .NET Core 2.0 tools are brand new they 
are not yet completely stable, we will continue to
+                               # use NUnit3 Console to test with for the time 
being.
+                               $projectDirectory = $testProject.DirectoryName
+                               Write-Host "Directory: $projectDirectory" 
-ForegroundColor Green
+
+                               $binaryRoot = 
"$projectDirectory\bin\$configuration\$framework"
+
+                               $testBinary = 
"$binaryRoot\win7-x64\$testName.dll"
+                               if (-not (Test-Path $testBinary)) {
+                                       $testBinary = 
"$binaryRoot\win7-x32\$testName.dll"
+                               }
+                               if (-not (Test-Path $testBinary)) {
+                                       $testBinary = 
"$binaryRoot\$testName.dll"
+                               } 
+
+                               $testExpression = 
"$tools_directory\NUnit\NUnit.ConsoleRunner.3.5.0\tools\nunit3-console.exe 
$testBinary --teamcity"
+                               $testExpression = "$testExpression 
--result:$testResultDirectory\TestResult.xml"
+
+                               if ($where -ne $null -and (-Not 
[System.String]::IsNullOrEmpty($where))) {
+                                       $testExpression = "$testExpression 
--where=$where"
+                               }
+                       }
 
                        Write-Host $testExpression -ForegroundColor Magenta
 

Reply via email to