Makes caasdriver exit with number of errors.

Also displays result and separator after each test.
This commit is contained in:
Grzegorz Adam Hankiewicz 2013-06-07 18:25:57 +02:00
commit 2793170fed
2 changed files with 16 additions and 8 deletions

3
.gitignore vendored
View file

@ -167,4 +167,7 @@ examples/cross_calculator/android/tags
/run.json /run.json
/testresults.html /testresults.html
/testresults.json /testresults.json
/tests/caas/imported
/tests/caas/main
/tests/caasdriver
/tools/nimgrep /tools/nimgrep

View file

@ -78,9 +78,14 @@ iterator caasTestsRunner*(filter = ""): tuple[test, output: string,
yield (scenario, outStream.data, r) yield (scenario, outStream.data, r)
when isMainModule: when isMainModule:
var filter = "" var
filter = ""
failures = 0
if paramCount() > 0: filter = paramStr(1) if paramCount() > 0: filter = paramStr(1)
for t, o, r in caasTestsRunner(filter): for test, output, result in caasTestsRunner(filter):
echo t, "\n", o echo test, "\n", output, "-> ", $result, "\n-----"
if not result:
failures += 1
quit(failures)