Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk merged: 17016,17052,17191
- Property svn:mergeinfo changed
-
stable/Build.ps1
r16754 r17192 1 1 # find ms build 2 2 $programFilesX86Dir = ($Env:ProgramFiles, ${Env:ProgramFiles(x86)})[[bool]${Env:ProgramFiles(x86)}] 3 $locations = @( 4 [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "Enterprise", "MSBuild", "15.0", "Bin", "amd64") 5 [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "Enterprise", "MSBuild", "15.0", "Bin") 6 [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "Community", "MSBuild", "15.0", "Bin", "amd64") 7 [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "Community", "MSBuild", "15.0", "Bin") 8 [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "BuildTools", "MSBuild", "15.0", "Bin", "amd64"), 9 [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "BuildTools", "MSBuild", "15.0", "Bin") 10 ) 3 $vsDir = [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio") 4 $years = @("2019", "2017") 5 $editions = @("Enterprise", "Professional", "Community", "BuildTools") 6 $versions = @("Current", "15.0") 11 7 12 8 $msBuildPath = $undefined 13 Foreach ($loc in $locations) { 14 $loc = [System.IO.Path]::Combine($loc, "MSBuild.exe") 15 If ([System.IO.File]::Exists($loc)) { 16 $msBuildPath = $loc 17 Break; 9 :search Foreach ($year in $years) { 10 $loc = [System.IO.Path]::Combine($vsDir, $year) 11 Foreach ($edition in $editions) { 12 $edLoc = [System.IO.Path]::Combine($loc, $edition, "MSBuild") 13 Foreach ($version in $versions) { 14 $binLoc = [System.IO.Path]::Combine($edLoc, $version, "Bin") 15 $loc64 = [System.IO.Path]::Combine($binLoc, "amd64", "MSBuild.exe") 16 $loc32 = [System.IO.Path]::Combine($binLoc, "MSBuild.exe") 17 18 If ([System.IO.File]::Exists($loc64)) { 19 $msBuildPath = $loc64 20 Break search; 21 } 22 If ([System.IO.File]::Exists($loc32)) { 23 $msBuildPath = $loc32 24 Break search; 25 } 26 } 18 27 } 19 28 } … … 24 33 Return 25 34 } 35 36 "MSBuild located at `"{0}`"." -f $msBuildPath 26 37 27 38 $curPath = $MyInvocation.MyCommand.Path -
stable/Test.cmd
r13305 r17192 1 1 @ECHO OFF 2 3 SET /P BUILDBEFORETEST=Should the test project be rebuilt [n]: 4 5 SET TESTCATEGORY=%~1 6 7 IF "%TESTCATEGORY%"=="" SET TESTCATEGORY=Essential 8 SET /P USERCATEGORY=Which category do you want to run [%TESTCATEGORY%]: 9 IF "%USERCATEGORY%" NEQ "" SET TESTCATEGORY=%USERCATEGORY% 10 11 set /P TESTPLATFORM=Which platform to run the tests [x64]: 12 IF "%TESTPLATFORM%"=="" SET TESTPLATFORM=x64 13 14 FOR /F "tokens=1,3 delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"') DO ( 15 IF "%%A"=="MSBuildToolsPath" SET MSBUILDPATH=%%B) 16 17 IF "%BUILDBEFORETEST%" NEQ "" ( 18 ECHO Building tests project ... 19 %MSBUILDPATH%msbuild.exe "HeuristicLab 3.3 Tests.sln" /target:Rebuild /p:Configuration="Debug",Platform="%TESTPLATFORM%" /m:2 /nologo /verbosity:q /clp:ErrorsOnly 20 ) 21 22 ECHO Test starting for category %TESTCATEGORY%... 23 24 FOR /F "tokens=1,2,* delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7"') DO ( 25 IF "%%A"=="14.0" SET VSPATH=%%C) 26 27 "%VSPATH%Common7\IDE\CommonExtensions\Microsoft\TestWindow\VSTest.Console.exe" bin\HeuristicLab.Tests.dll /Framework:framework40 /Platform:%TESTPLATFORM% /TestCaseFilter:"TestCategory=%TESTCATEGORY%" 28 29 PAUSE 2 powershell.exe .\Test.ps1 -
stable/Test.ps1
r17016 r17192 1 1 # find ms build 2 2 $programFilesX86Dir = ($Env:ProgramFiles, ${Env:ProgramFiles(x86)})[[bool]${Env:ProgramFiles(x86)}] 3 $locations = @( 4 [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "Enterprise") 5 [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "Community") 6 [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio", "2017", "BuildTools") 7 ) 3 $vsDir = [System.IO.Path]::Combine($programFilesX86Dir, "Microsoft Visual Studio") 4 $years = @("2019", "2017") 5 $editions = @("Enterprise", "Professional", "Community", "BuildTools") 6 $versions = @("Current", "15.0") 8 7 8 $msBuildPath = $undefined 9 9 $vstestPath = $undefined 10 Foreach ($loc in $locations) { 11 $vstestloc = [System.IO.Path]::Combine($loc, "Common7", "IDE", "CommonExtensions", "Microsoft", "TestWindow", "vstest.console.exe") 12 If([System.IO.File]::Exists($vstestloc)) { 13 $vstestPath = $vstestloc 14 Break; 10 :search Foreach ($year in $years) { 11 $loc = [System.IO.Path]::Combine($vsDir, $year) 12 Foreach ($edition in $editions) { 13 $edLoc = [System.IO.Path]::Combine($loc, $edition, "MSBuild") 14 Foreach ($version in $versions) { 15 $binLoc = [System.IO.Path]::Combine($edLoc, $version, "Bin") 16 $loc64 = [System.IO.Path]::Combine($binLoc, "amd64", "MSBuild.exe") 17 $loc32 = [System.IO.Path]::Combine($binLoc, "MSBuild.exe") 18 19 If ([System.IO.File]::Exists($loc64)) { 20 $msBuildPath = $loc64 21 $vstestPath = [System.IO.Path]::Combine($loc, $edition, "Common7", "IDE", "CommonExtensions", "Microsoft", "TestWindow", "vstest.console.exe") 22 Break search; 23 } 24 If ([System.IO.File]::Exists($loc32)) { 25 $msBuildPath = $loc32 26 $vstestPath = [System.IO.Path]::Combine($loc, $edition, "Common7", "IDE", "CommonExtensions", "Microsoft", "TestWindow", "vstest.console.exe") 27 Break search; 28 } 29 } 15 30 } 16 31 } … … 18 33 If ($vstestPath -eq $undefined) { 19 34 "Could not locate vstest.console.exe, ABORTING ..." 35 Return 36 } 37 38 If(-not [System.IO.File]::Exists($vstestPath)) { 39 "vstest.console.exe is not found at $vstestPath, ABORTING ..." 20 40 Return 21 41 } … … 39 59 40 60 If($dobuild) { 41 42 $msBuildPath = $undefined43 Foreach ($loc in $locations) {44 $msbuildloc64 = [System.IO.Path]::Combine($loc, "MSBuild", "15.0", "Bin", "amd64", "MSBuild.exe")45 $msbuildloc32 = [System.IO.Path]::Combine($loc, "MSBuild", "15.0", "Bin", "MSBuild.exe")46 If ([System.IO.File]::Exists($msbuildloc64)) {47 $msBuildPath = $msbuildloc6448 Break;49 } ElseIf ([System.IO.File]::Exists($msbuildloc32)) {50 $msBuildPath = $msbuildloc3251 Break;52 }53 }54 55 If ($msBuildPath -eq $undefined) {56 "Could not locate MSBuild, ABORTING ..."57 Return58 }59 60 61 $curPath = $MyInvocation.MyCommand.Path 61 62 $curDir = Split-Path $curPath
Note: See TracChangeset
for help on using the changeset viewer.