From 3db2fab423e072bedce9446e167921e7b8e2e5e7 Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Thu, 7 Mar 2024 14:30:42 -0800 Subject: [PATCH] add output on failure --- tests/tests.wake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/tests.wake b/tests/tests.wake index 6e9269bb5..2be715ceb 100644 --- a/tests/tests.wake +++ b/tests/tests.wake @@ -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 =