Skip to content

Commit 6790e2d

Browse files
committed
Improve test logging
1 parent f522a76 commit 6790e2d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

jbrowse/src/org/labkey/jbrowse/JBrowseManager.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,19 @@ public static class TestCase extends Assert
238238
public void testJBrowseCli() throws Exception
239239
{
240240
File exe = JBrowseManager.get().getJbrowseCli();
241-
String output = new SimpleScriptWrapper(_log).executeWithOutput(Arrays.asList(exe.getPath(), "help"));
241+
SimpleScriptWrapper wrapper = new SimpleScriptWrapper(_log);
242+
wrapper.setThrowNonZeroExits(false);
243+
244+
String output = wrapper.executeWithOutput(Arrays.asList(exe.getPath(), "help"));
245+
if (wrapper.getLastReturnCode() != 0)
246+
{
247+
_log.error("Non-zero exit from testJBrowseCli: " + wrapper.getLastReturnCode());
248+
wrapper.getCommandsExecuted().forEach(_log::error);
249+
_log.error("output: ");
250+
_log.error(output);
251+
252+
throw new RuntimeException("Non-zero exit running testJBrowseCli: " + wrapper.getLastReturnCode());
253+
}
242254

243255
assertTrue("Malformed output", output.contains("Add an assembly to a JBrowse 2 configuration"));
244256
}

0 commit comments

Comments
 (0)