From: Hiroshi Inoue Date: Tue, 6 Sep 2016 11:56:30 +0000 (+0900) Subject: Add a helper batch command for regression test. X-Git-Tag: REL-09_06_0100~93 X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/queryCache.php?a=commitdiff_plain;h=75a697037bc4746ea5a3750051e2c6f1fcaf44bc;p=psqlodbc.git Add a helper batch command for regression test. --- diff --git a/regress.bat b/regress.bat new file mode 100755 index 0000000..cf7e34e --- /dev/null +++ b/regress.bat @@ -0,0 +1,11 @@ +:: +:: regression test using MSBuild +:: +@echo off +if "%1" == "/?" ( + powershell Get-Help %~dp0\winbuild\regress.ps1 -detailed +) else if "%1" == "-?" ( + powershell Get-Help %~dp0\winbuild\regress.ps1 %2 %3 %4 %5 %6 %7 %8 %9 +) else ( + powershell %~dp0\winbuild\regress.ps1 %* +) diff --git a/winbuild/regress.ps1 b/winbuild/regress.ps1 index 255e96e..8cccfd9 100644 --- a/winbuild/regress.ps1 +++ b/winbuild/regress.ps1 @@ -181,14 +181,14 @@ function RunTest($scriptPath, $Platform) popd } +$scriptPath = (Split-Path $MyInvocation.MyCommand.Path) $usingExe=$false -$testsf="..\test\tests" +$testsf="$scriptPath\..\test\tests" Write-Debug testsf=$testsf -$vcxfile="./generated_regress.vcxproj" +$vcxfile="$scriptPath\generated_regress.vcxproj" $TESTEXES=vcxfile_make $testsf $vcxfile $usingExe -$scriptPath = (Split-Path $MyInvocation.MyCommand.Path) $configInfo = & "$scriptPath\configuration.ps1" "$BuildConfigPath" Import-Module ${scriptPath}\MSProgram-Get.psm1 $msbuildexe=Find-MSBuild ([ref]$VCVersion) ([ref]$MSToolsVersion) ([ref]$Toolset) $configInfo @@ -199,6 +199,7 @@ if ($Platform -ieq "both") { $pary = @($Platform) } +cd $scriptPath foreach ($pl in $pary) { invoke-expression -Command "& `"${msbuildexe}`" $vcxfile /tv:$MSToolsVersion /p:Platform=$pl``;Configuration=$Configuration``;PlatformToolset=${Toolset} /t:$target /p:VisualStudioVersion=${VisualStudioVersion} /Verbosity:minimal"