diff options
author | Zahary Karadjov <zahary@gmail.com> | 2013-05-04 01:04:02 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2013-05-04 01:04:28 +0300 |
commit | a8e12afc76125fd7931e08d56d17c7b40c6e2065 (patch) | |
tree | 989872b74158f24507a4f3d6136fd82bd33cbba4 /tests/tester.nim | |
parent | ac9db5d6840c88cd89e4df5a47d1bdeedb07d170 (diff) | |
download | Nim-a8e12afc76125fd7931e08d56d17c7b40c6e2065.tar.gz |
test-runner for caas multi-step tests
Diffstat (limited to 'tests/tester.nim')
-rw-r--r-- | tests/tester.nim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/tester.nim b/tests/tester.nim index 2b60151a8..8c8e31fe8 100644 --- a/tests/tester.nim +++ b/tests/tester.nim @@ -11,7 +11,7 @@ import parseutils, strutils, pegs, os, osproc, streams, parsecfg, browsers, json, - marshal, cgi, parseopt + marshal, cgi, parseopt, caasdriver const cmdTemplate = r"nimrod cc --hints:on $# $#" @@ -38,6 +38,7 @@ type reExeNotFound, reIgnored, # test is ignored reSuccess # test was successful + TTarget = enum targetC, targetCpp, targetObjC, targetJS @@ -363,6 +364,10 @@ proc outputJSON(reject, compile, run: TResults) = var s = pretty(doc) writeFile(jsonFile, s) +proc runCaasTests(r: var TResults) = + for test, output, status in caasTestsRunner(): + r.addResult(test, "", output, if status: reSuccess else: reOutputsDiffer) + proc main() = os.putenv "NIMTEST_NO_COLOR", "1" os.putenv "NIMTEST_OUTPUT_LVL", "PRINT_FAILURES" @@ -404,6 +409,7 @@ proc main() = writeResults(runJson, r) of "special": runSpecialTests(r, p.cmdLineRest.string) + runCaasTests(r) writeResults(runJson, r) of "rodfiles": runRodFiles(r, p.cmdLineRest.string) |