Skip to content

Commit

Permalink
add output on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
V-FEXrt committed Mar 8, 2024
1 parent 35539d8 commit 3db2fab
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/tests.wake
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,24 @@ def runTest (testScript: Path): Result Unit Error =
True True -> Pass Unit
False False -> Pass Unit
True False ->
def _ =
"{testName} Failed! Stdout: \n{jobStdout}"
| printlnLevel logWarning

def _ =
"{testName} Failed! Stderr: \n{jobStderr}"
| printlnLevel logWarning

Fail (makeError "Test failed. Expected: Ok, Actual: {format testJob.getJobStatus}. See above for details")
False True ->
def _ =
"{testName} Failed! Stdout: \n{jobStdout}"
| printlnLevel logWarning

def _ =
"{testName} Failed! Stderr: \n{jobStderr}"
| printlnLevel logWarning

Fail (makeError "Test failed. Expected: Err, Actual: {format testJob.getJobStatus}. See above for details")

def expectEqualOutput (stream: String) (expected: Option String) (actual: String): Result Unit Error =
Expand Down

0 comments on commit 3db2fab

Please sign in to comment.