tie into appveyor test results api
This commit is contained in:
parent
c2940260e5
commit
c34cbe690c
1 changed files with 10 additions and 0 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue