tie into appveyor test results api

This commit is contained in:
Aman Gupta 2015-10-07 16:06:51 -07:00
commit c34cbe690c

View file

@ -164,6 +164,16 @@ proc addResult(r: var TResults, test: TTest,
styledEcho fgYellow, "Gotten:" styledEcho fgYellow, "Gotten:"
styledEcho styleBright, given, "\n" styledEcho styleBright, given, "\n"
if existsEnv("APPVEYOR"):
let (outcome, msg) =
if success == reSuccess:
("Passed", "")
elif success == reIgnored:
("Skipped", "")
else:
("Failed", "Expected:" & expected & "\n" & "Gotten:" & given & "\n")
discard execProcess("appveyor", args=["AddTest", name, "-Framework", test.cat.string, "-FileName", $test.name, "-Outcome", outcome, "-ErrorMessage", msg], options={poStdErrToStdOut, poUsePath})
proc cmpMsgs(r: var TResults, expected, given: TSpec, test: TTest) = proc cmpMsgs(r: var TResults, expected, given: TSpec, test: TTest) =
if strip(expected.msg) notin strip(given.msg): if strip(expected.msg) notin strip(given.msg):
r.addResult(test, expected.msg, given.msg, reMsgsDiffer) r.addResult(test, expected.msg, given.msg, reMsgsDiffer)