summary refs log tree commit diff stats
path: root/testament
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2018-11-13 15:21:14 +0100
committerAraq <rumpf_a@web.de>2018-11-23 11:58:28 +0100
commit031bfdec6f7798b99cc7bf9473a08048228c3d2a (patch)
treebd9b3ee9fbbaca154f37649f7f3cabe59cfdc349 /testament
parent610283b9b0d48b1714bef2969b402b77410ce4dd (diff)
downloadNim-031bfdec6f7798b99cc7bf9473a08048228c3d2a.tar.gz
make run the default action of a test in tester
Diffstat (limited to 'testament')
-rw-r--r--testament/categories.nim1
-rw-r--r--testament/specs.nim8
-rw-r--r--testament/tester.nim2
3 files changed, 6 insertions, 5 deletions
diff --git a/testament/categories.nim b/testament/categories.nim
index 36f2a271a..4bc2607cd 100644
--- a/testament/categories.nim
+++ b/testament/categories.nim
@@ -531,6 +531,7 @@ proc processCategory(r: var TResults, cat: Category, options: string) =
   else:
     var testsRun = 0
     for name in os.walkFiles("tests" & DirSep &.? cat.string / "t*.nim"):
+      echo name
       testSpec r, makeTest(name, options, cat)
       inc testsRun
     if testsRun == 0:
diff --git a/testament/specs.nim b/testament/specs.nim
index c51a3343e..ed3388f75 100644
--- a/testament/specs.nim
+++ b/testament/specs.nim
@@ -10,18 +10,18 @@
 import parseutils, strutils, os, osproc, streams, parsecfg
 
 
-var compilerPrefix* = "compiler" / "nim "
+var compilerPrefix* = "compiler" / "nim"
 
 let isTravis* = existsEnv("TRAVIS")
 let isAppVeyor* = existsEnv("APPVEYOR")
 
 proc cmdTemplate*(): string =
-  compilerPrefix & "$target --lib:lib --hints:on -d:testing --nimblePath:tests/deps $options $file"
+  compilerPrefix & " $target --lib:lib --hints:on -d:testing --nimblePath:tests/deps $options $file"
 
 type
   TTestAction* = enum
-    actionCompile = "compile"
     actionRun = "run"
+    actionCompile = "compile"
     actionReject = "reject"
     actionRunNoSpec = "runNoSpec"
   TResultEnum* = enum
@@ -186,7 +186,7 @@ proc parseSpec*(filename: string): TSpec =
         raise newException(ValueError, "cannot interpret as a bool: " & e.value)
     of "cmd":
       if e.value.startsWith("nim "):
-        result.cmd = compilerPrefix & e.value[4..^1]
+        result.cmd = compilerPrefix & e.value[3..^1]
       else:
         result.cmd = e.value
     of "ccodecheck": result.ccodeCheck = e.value
diff --git a/testament/tester.nim b/testament/tester.nim
index 169210255..166067dc2 100644
--- a/testament/tester.nim
+++ b/testament/tester.nim
@@ -469,7 +469,7 @@ proc main() =
     of "targets":
       targetsStr = p.val.string
       targets = parseTargets(targetsStr)
-    of "nim": compilerPrefix = p.val.string & " "
+    of "nim": compilerPrefix = p.val.string
     else: quit Usage
     p.next()
   if p.kind != cmdArgument: quit Usage