Appveyor thttpclient (#6744)

* App option value for disabling tests for AppVeyor

* Disable thttpclient on AppVeyor
This commit is contained in:
Fredrik Høisæther Rasch 2017-11-15 17:25:48 +01:00 • committed by Andreas Rumpf
commit 3d5d6931f0
2 changed files with 4 additions and 0 deletions

View file

@ -3,6 +3,7 @@ discard """
exitcode: 0 exitcode: 0
output: "OK" output: "OK"
disabled: "travis" disabled: "travis"
disabled: "appveyor"
""" """
import strutils import strutils

View file

@ -13,6 +13,7 @@ import parseutils, strutils, os, osproc, streams, parsecfg
var compilerPrefix* = "compiler" / "nim " var compilerPrefix* = "compiler" / "nim "
let isTravis = existsEnv("TRAVIS") let isTravis = existsEnv("TRAVIS")
let isAppVeyor = existsEnv("APPVEYOR")
proc cmdTemplate*(): string = proc cmdTemplate*(): string =
compilerPrefix & "$target --lib:lib --hints:on -d:testing $options $file" compilerPrefix & "$target --lib:lib --hints:on -d:testing $options $file"
@ -178,6 +179,8 @@ proc parseSpec*(filename: string): TSpec =
when defined(posix): result.err = reIgnored when defined(posix): result.err = reIgnored
of "travis": of "travis":
if isTravis: result.err = reIgnored if isTravis: result.err = reIgnored
of "appveyor":
if isAppVeyor: result.err = reIgnored
else: else:
raise newException(ValueError, "cannot interpret as a bool: " & e.value) raise newException(ValueError, "cannot interpret as a bool: " & e.value)
of "cmd": of "cmd":