You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/04/05 22:01:41 UTC

[4/4] lucenenet git commit: runbuild.ps1: Changed build to use NUnit console runner for .NET 4.5.1, which seems to be more robust than dotnet test

runbuild.ps1: Changed build to use NUnit console runner for .NET 4.5.1, which seems to be more robust than dotnet test


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

Branch: refs/heads/api-work
Commit: 240a6bfa59428186bfa9fdc18cc227c02c4d7ab2
Parents: 52daf25
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Apr 6 04:50:01 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Apr 6 05:01:11 2017 +0700

----------------------------------------------------------------------
 runbuild.ps1 | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/240a6bfa/runbuild.ps1
----------------------------------------------------------------------
diff --git a/runbuild.ps1 b/runbuild.ps1
index fa1889d..14a5f7f 100644
--- a/runbuild.ps1
+++ b/runbuild.ps1
@@ -264,7 +264,7 @@ function Test-Projects($projects) {
     $excludeCategories = Generate-ExcludeCategoryString $ExcludeTestCategories
 
     foreach ($project in $projects) {
-        
+
         pushd $project.DirectoryName
 
         $testName = $project.Directory.Name
@@ -277,9 +277,23 @@ function Test-Projects($projects) {
             
             $testResult = "TestResult.$framework.xml"
 
-            $testExpression = "dotnet.exe test --configuration $Configuration --framework $framework --no-build $excludeCategories"
+			if ($framework.StartsWith("netcore")) {
+				$testExpression = "dotnet.exe test --configuration $Configuration --framework $framework --no-build $excludeCategories"
+			} else {
+				$projectDirectory = $project.DirectoryName
+
+				$testBinary = "$projectDirectory\bin\$Configuration\$framework\win7-x64\$testName.dll"
+				if (-not (Test-Path $testBinary)) {
+					$testBinary = "$projectDirectory\bin\$Configuration\$framework\win7-x32\$testName.dll"
+				}
+				if (-not (Test-Path $testBinary)) {
+					$testBinary = "$projectDirectory\bin\$Configuration\$framework\$testName.dll"
+				} 
+
+				$testExpression = "$root\lib\NUnit\NUnit.ConsoleRunner.3.5.0\tools\nunit3-console.exe $testBinary $excludeCategories"
+			}
 
-            Write-Host $testExpression
+            Write-Host $testExpression -ForegroundColor Magenta
             
             if ($Quiet) {
                 $outputLog = "output.$framework.log"