Makes caasdriver exit with number of errors.
Also displays result and separator after each test.
This commit is contained in:
parent
b92c87e2ec
commit
2793170fed
2 changed files with 16 additions and 8 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue