summary refs log tree commit diff stats
path: root/tests/testament/specs.nim
diff options
context:
space:
mode:
authorDaniil Yarancev <21169548+Yardanico@users.noreply.github.com>2018-01-07 21:02:00 +0300
committerGitHub <noreply@github.com>2018-01-07 21:02:00 +0300
commitfb44c522e6173528efa8035ecc459c84887d0167 (patch)
treea2f5e98606be265981a5f72748896967033e23d7 /tests/testament/specs.nim
parentccf99fa5ce4fe992fb80dc89271faa51456c3fa5 (diff)
parente23ea64c41e101d4e1d933f0b015f51cc6c2f7de (diff)
downloadNim-fb44c522e6173528efa8035ecc459c84887d0167.tar.gz
Merge pull request #1 from nim-lang/devel
upstream
Diffstat (limited to 'tests/testament/specs.nim')
-rw-r--r--tests/testament/specs.nim12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/testament/specs.nim b/tests/testament/specs.nim
index 89e786d48..ac79e3942 100644
--- a/tests/testament/specs.nim
+++ b/tests/testament/specs.nim
@@ -12,6 +12,9 @@ import parseutils, strutils, os, osproc, streams, parsecfg
 
 var compilerPrefix* = "compiler" / "nim "
 
+let isTravis = existsEnv("TRAVIS")
+let isAppVeyor = existsEnv("APPVEYOR")
+
 proc cmdTemplate*(): string =
   compilerPrefix & "$target --lib:lib --hints:on -d:testing $options $file"
 
@@ -113,7 +116,7 @@ proc specDefaults*(result: var TSpec) =
   result.maxCodeSize = 0
 
 proc parseTargets*(value: string): set[TTarget] =
-  for v in value.normalize.split:
+  for v in value.normalize.splitWhitespace:
     case v
     of "c": result.incl(targetC)
     of "cpp", "c++": result.incl(targetCpp)
@@ -149,6 +152,7 @@ proc parseSpec*(filename: string): TSpec =
       result.sortoutput = parseCfgBool(e.value)
     of "exitcode":
       discard parseInt(e.value, result.exitCode)
+      result.action = actionRun
     of "msg":
       result.msg = e.value
       if result.action != actionRun:
@@ -174,6 +178,10 @@ proc parseSpec*(filename: string): TSpec =
         when defined(unix): result.err = reIgnored
       of "posix":
         when defined(posix): result.err = reIgnored
+      of "travis":
+        if isTravis: result.err = reIgnored
+      of "appveyor":
+        if isAppVeyor: result.err = reIgnored
       else:
         raise newException(ValueError, "cannot interpret as a bool: " & e.value)
     of "cmd":
@@ -184,7 +192,7 @@ proc parseSpec*(filename: string): TSpec =
     of "ccodecheck": result.ccodeCheck = e.value
     of "maxcodesize": discard parseInt(e.value, result.maxCodeSize)
     of "target", "targets":
-      for v in e.value.normalize.split:
+      for v in e.value.normalize.splitWhitespace:
         case v
         of "c": result.targets.incl(targetC)
         of "cpp", "c++": result.targets.incl(targetCpp)