Skip to content

Commit

Permalink
Fix Windows unit tests (#5161)
Browse files Browse the repository at this point in the history
Fixes order of commands in unittests.ps1: inv rtloader.test needs the dependencies provided by inv deps.
Exits early if any of the commands fail.
  • Loading branch information
KSerrania authored Mar 24, 2020
1 parent a2b800b commit 5534fdd
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tasks/winbuildscripts/unittests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ if ($Env:TARGET_ARCH -eq "x86") {
$archflag = "x86"
}
& go get gopkg.in/yaml.v2
& inv -e deps --verbose --dep-vendor-only

& inv -e rtloader.make --python-runtimes="$Env:PY_RUNTIMES" --install-prefix=$Env:BUILD_ROOT\dev --cmake-options='-G \"Unix Makefiles\"' --arch $archflag
$err = $LASTEXITCODE
Write-Host Build result is $err
Expand All @@ -24,6 +26,12 @@ if($err -ne 0){
}

& inv -e rtloader.install
$err = $LASTEXITCODE
Write-Host rtloader install result is $err
if($err -ne 0){
Write-Host -ForegroundColor Red "rtloader install failed $err"
[Environment]::Exit($err)
}

# & inv -e rtloader.format --raise-if-changed
# $err = $LASTEXITCODE
Expand All @@ -35,11 +43,16 @@ if($err -ne 0){
# }

& inv -e rtloader.test
& inv -e deps --dep-vendor-only
$err = $LASTEXITCODE
Write-Host rtloader test result is $err
if($err -ne 0){
Write-Host -ForegroundColor Red "rtloader test failed $err"
[Environment]::Exit($err)
}

& inv -e test --race --profile --cpus 4 --arch $archflag --python-runtimes="$Env:PY_RUNTIMES" --python-home-2=$Env:Python2_ROOT_DIR --python-home-3=$Env:Python3_ROOT_DIR --rtloader-root=$Env:BUILD_ROOT\rtloader
$err = $LASTEXITCODE
Write-Host Test result is $err

if($err -ne 0){
Write-Host -ForegroundColor Red "test failed $err"
[Environment]::Exit($err)
Expand Down

0 comments on commit 5534fdd

Please sign in to comment.