Repository: lucenenet
Updated Branches:
  refs/heads/api-work 84abcb4d6 -> 6154a1893


build\build.ps1: Updated test task to account for the fact that dotnet.exe 
cannot run multiple projects at a time


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

Branch: refs/heads/api-work
Commit: 6154a1893d8e5947b761219d21f624576425dcf2
Parents: 84abcb4
Author: Shad Storhaug <[email protected]>
Authored: Mon Apr 10 23:47:28 2017 +0700
Committer: Shad Storhaug <[email protected]>
Committed: Mon Apr 10 23:47:28 2017 +0700

----------------------------------------------------------------------
 build/build.ps1 | 38 ++++++++++++++++++--------------------
 1 file changed, 18 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6154a189/build/build.ps1
----------------------------------------------------------------------
diff --git a/build/build.ps1 b/build/build.ps1
index d56f8df..dfe8b11 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -17,7 +17,7 @@
        
        #test paramters
        [string]$frameworks_to_test = "net451,netcoreapp1.0"
-       [string]$where
+       [string]$where = ""
 }
 
 task default -depends Build
@@ -89,13 +89,16 @@ task Test -description "This task runs the tests" {
        foreach ($framework in $frameworksToTest) {
                Write-Host "Framework: $framework" -ForegroundColor Blue
 
-               if ($framework.StartsWith("netcore")) {
-                       $testExpression = "dotnet.exe test --framework 
$framework --no-build"
-               } else {
-                       foreach ($testProject in $testProjects) {
-                               $projectDirectory = $testProject.DirectoryName
+               foreach ($testProject in $testProjects) {
+
+                       $projectDirectory = $testProject.DirectoryName
+                       Write-Host "Directory: $projectDirectory" 
-ForegroundColor Green
+
+                       if ($framework.StartsWith("netcore")) {
+                               $testExpression = "dotnet.exe test 
'$projectDirectory\project.json' --configuration $configuration --no-build"
+                       } else {
                                $testName = $testProject.Directory.Name
-                               $binaryRoot = 
"$projectDirectory\bin\$Configuration\$framework"
+                               $binaryRoot = 
"$projectDirectory\bin\$configuration\$framework"
 
                                $testBinary = 
"$binaryRoot\win7-x64\$testName.dll"
                                if (-not (Test-Path $testBinary)) {
@@ -105,24 +108,19 @@ task Test -description "This task runs the tests" {
                                        $testBinary = 
"$binaryRoot\$testName.dll"
                                } 
 
-                               if ($testBinaries -eq $null) {
-                                       $testBinaries = @($testBinary)
-                               } else {
-                                       $testBinaries = $testBinaries += 
$testBinary
-                               }
+                               $testExpression = 
"$tools_directory\NUnit\NUnit.ConsoleRunner.3.5.0\tools\nunit3-console.exe 
$testBinary"
                        }
 
-                       $binaryString = $testBinaries -join ';'
-                       $testExpression = 
"$tools_directory\NUnit\NUnit.ConsoleRunner.3.5.0\tools\nunit3-console.exe 
$binaryString"
-               }
+                       $testExpression = "$testExpression 
--result:$projectDirectory\TestResult.xml"
 
-               if ($where -ne $null -and (-Not 
[System.String]::IsNullOrEmpty($where))) {
-                       $testExpression = "$testExpression --where $where"
-               }
+                       if ($where -ne $null -and (-Not 
[System.String]::IsNullOrEmpty($where))) {
+                               $testExpression = "$testExpression --where 
$where"
+                       }
 
-               Write-Host $testExpression -ForegroundColor Magenta
+                       Write-Host $testExpression -ForegroundColor Magenta
 
-               Invoke-Expression $testExpression
+                       Invoke-Expression $testExpression
+               }
        }
 }
 

Reply via email to