clone_folder: c:\gopath\src\github.com\containernetworking\plugins

environment:
  GOPATH: c:\gopath

install:
  - echo %PATH%
  - echo %GOPATH%
  - go version
  - go env
  - ps: $webClient = New-Object System.Net.WebClient; $InstallPath="c:" ; $webClient.DownloadFile("https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/gcc.zip", "$InstallPath\gcc.zip"); Expand-Archive $InstallPath\gcc.zip -DestinationPath $InstallPath\gcc -Force; $webClient.DownloadFile("https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/runtime.zip", "$InstallPath\runtime.zip"); Expand-Archive $InstallPath\runtime.zip -DestinationPath $InstallPath\gcc -Force; $webClient.DownloadFile("https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/binutils.zip","$InstallPath\binutils.zip"); Expand-Archive $InstallPath\binutils.zip -DestinationPath $InstallPath\gcc -Force;
  - set PATH=%GOPATH%\bin;c:\go\bin;c:\gcc\bin;%PATH%

build: off

test_script:
  - ps: |
      go list ./... | Select-String -Pattern (Get-Content "./plugins/windows_only.txt") > "to_test.txt"
      echo "Will test:"
      Get-Content "to_test.txt"
      foreach ($pkg in Get-Content "to_test.txt") {
        if ($pkg) {
          echo $pkg
          go test -v $pkg
          if ($LastExitCode -ne 0) {
            throw "test failed"
          }
        }
      }
