forked from libbitcoin/libbitcoin-system
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable appveyor successful execution.
- Loading branch information
Showing
3 changed files
with
61 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
$BIN_PATH = "c:\git\libbitcoin\bin" | ||
$TEST_EXE_NAME = "libbitcoin-test.exe" | ||
$TEST_ARGS = "--run_test=* --show_progress=no --detect_memory_leak=0 --report_level=no --build_info=yes" | ||
|
||
Write-Host "Locating test executables..." -ForegroundColor Cyan | ||
|
||
$DISCOVERED_EXES = @(Get-ChildItem -Path $BIN_PATH -recurse | Where-Object { $_.Name -eq $TEST_EXE_NAME }) | ||
|
||
If ($DISCOVERED_EXES.Count -ne 1) { | ||
Write-Host "Failure, invalid count of test elements" -ForegroundColor Red | ||
exit 1 | ||
} | ||
|
||
Write-Host "Found single instance: " $DISCOVERED_EXES.Name -ForegroundColor Cyan | ||
|
||
$DISCOVERED_EXES.FullName | ForEach-Object { | ||
Write-Host "Executing $_ $TEST_ARGS" -ForegroundColor Cyan | ||
try { | ||
Invoke-Expression "$_ $TEST_ARGS" | ||
} | ||
catch { | ||
$error = $_ | ||
Write-Host "Failure executing tests: " $error -ForegroundColor Red | ||
exit $error | ||
} | ||
} | ||
|
||
Write-Host "Complete." -ForegroundColor Green | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
function GetUninstallString($productName) { | ||
$x64items = @(Get-ChildItem "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall") | ||
($x64items + @(Get-ChildItem "HKLM:SOFTWARE\wow6432node\Microsoft\Windows\CurrentVersion\Uninstall") ` | ||
| ForEach-object { Get-ItemProperty Microsoft.PowerShell.Core\Registry::$_ } ` | ||
| Where-Object { $_.DisplayName -and $_.DisplayName.Contains($productName) } ` | ||
| Select UninstallString).UninstallString | ||
} | ||
|
||
Write-Host "Uninstalling Microsoft Visual C++ 2013 Redistributable (x64)..." | ||
"$(GetUninstallString "Microsoft Visual C++ 2013 Redistributable (x64)") /quiet" | out-file "$env:temp\uninstall.cmd" -Encoding ASCII | ||
& $env:temp\uninstall.cmd | ||
|
||
Write-Host "Uninstalling Microsoft Visual C++ 2013 Redistributable (x86)..." | ||
"$(GetUninstallString "Microsoft Visual C++ 2013 Redistributable (x86)") /quiet" | out-file "$env:temp\uninstall.cmd" -Encoding ASCII | ||
& $env:temp\uninstall.cmd | ||
|
||
Write-Host "Downloading Visual C++ Compiler November 2013 CTP..." -ForegroundColor Cyan | ||
$exePath = "$($env:TEMP)\vc_CompilerCTP.Nov2013.exe" | ||
(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/3/C/2/3C271B79-6354-4B66-9014-C6CEBC14C5C4/vc_CompilerCTP.Nov2013.exe', $exePath) | ||
|
||
Write-Host "Installing..." | ||
cmd /c start /wait $exePath /install /quiet /norestart /log c:\users\appveyor\install-log.txt | ||
|
||
Write-Host "Installed" -ForegroundColor green | ||
|