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/07 07:18:40 UTC
[3/3] lucenenet git commit: Added option to run tests from build.bat
and removed RunAllTests environment variable setting
Added option to run tests from build.bat and removed RunAllTests environment variable setting
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/45ed8149
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/45ed8149
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/45ed8149
Branch: refs/heads/api-work
Commit: 45ed8149dac58d0793bb06f436a8fcc82c29e889
Parents: f75f141
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Apr 7 13:54:10 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Apr 7 14:18:18 2017 +0700
----------------------------------------------------------------------
build.bat | 22 +++++++++++++++++++++-
runbuild.ps1 | 6 ------
2 files changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/45ed8149/build.bat
----------------------------------------------------------------------
diff --git a/build.bat b/build.bat
index 6db4b72..8c0a22a 100644
--- a/build.bat
+++ b/build.bat
@@ -18,6 +18,9 @@ GOTO endcommentblock
:: -Configuration:<Configuration>
:: -config:<Configuration> - MSBuild configuration for the build.
::
+:: -Test
+:: -t - Run the tests.
+::
:: All options are case insensitive.
::
:: To escape any of the options, put double quotes around the entire value, like this:
@@ -41,6 +44,7 @@ set configuration=Release
IF NOT "%config%" == "" (
set configuration=%config%
)
+set runtests=false
FOR %%a IN (%*) DO (
FOR /f "useback tokens=*" %%a in ('%%a') do (
@@ -75,7 +79,23 @@ FOR %%a IN (%*) DO (
IF /I !test!==-configuration: (
set configuration=!value:~15!
)
+
+ set test=!value:~0,2!
+ IF /I !test!==-t (
+ set runtests=true
+ )
+
+ set test=!value:~0,5!
+ IF /I !test!==-test: (
+ set runtests=true
+ )
)
)
-powershell -ExecutionPolicy Bypass -Command "& .\runbuild.ps1 -CreatePackages -Version \"%version%\" -PackageVersion \"%PackageVersion%\" -Configuration \"%configuration%\""
+if "!runtests!"=="true" (
+ powershell -ExecutionPolicy Bypass -Command "& .\runbuild.ps1 -CreatePackages -Version \"%version%\" -PackageVersion \"%PackageVersion%\" -Configuration \"%configuration%\" -RunTests -FrameworksToTest @(\""net451\"", \""netcoreapp1.0\"")"
+) else (
+ powershell -ExecutionPolicy Bypass -Command "& .\runbuild.ps1 -CreatePackages -Version \"%version%\" -PackageVersion \"%PackageVersion%\" -Configuration \"%configuration%\""
+)
+
+endlocal
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/45ed8149/runbuild.ps1
----------------------------------------------------------------------
diff --git a/runbuild.ps1 b/runbuild.ps1
index 14a5f7f..30bdf6e 100644
--- a/runbuild.ps1
+++ b/runbuild.ps1
@@ -137,12 +137,6 @@ if ($Version -eq "0.0.0" -or [string]::IsNullOrEmpty($Version)) {
}
}
-#Environment variables to ensure all tests are run %BuildRunner% or %RunAllTests%
-if ($env:RunAllTests -eq "true") {
- $RunTests = $true
- $FrameworksToTest = @("net451", "netcoreapp1.0")
-}
-
function Ensure-Directory-Exists([string] $path)
{
if (!(Test-Path $path)) {