Skip to content

Commit

Permalink
add windows test suite downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco149 committed Feb 19, 2019
1 parent 520d6c9 commit 560e489
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/download_suite
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fi
olddir="$(pwd)"
cd "$wdir" || exit $?

url="https://github.com/Francesco149/oppai-ng/releases/download/2.3.2/test_suite_2019-02-19.tar.gz"
url="$(cat ./suite_url)"

if [ $(find test_suite 2>/dev/null | tail -n +2 | wc -l) = "0" ]; then
curl -LO "$url" || exit $?
Expand Down
19 changes: 19 additions & 0 deletions test/download_suite.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# you must allow script execution by running
# 'Set-ExecutionPolicy RemoteSigned' in an admin powershell
# 7zip is also required (choco install 7zip and add it to path)

$url = Get-Content .\suite_url -Raw
$dir = Split-Path -Parent $MyInvocation.MyCommand.Definition
Push-Location "$dir"

if ((Test-Path .\test_suite) -and (Get-ChildItem .\test_suite | Measure-Object).Count -gt 0) {
Write-Host "using existing test_suite"
} else {
# my windows 7 install doesn't support Tls3
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
(New-Object System.Net.WebClient).DownloadFile($url, "$dir\test_suite.tar.gz")
&7z x .\test_suite.tar.gz
&7z x .\test_suite.tar
}

Pop-Location
1 change: 1 addition & 0 deletions test/suite_url
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/Francesco149/oppai-ng/releases/download/2.3.2/test_suite_2019-02-19.tar.gz

0 comments on commit 560e489

Please sign in to comment.