Filesystem Tests: Add stopping-on-first-failure option

This commit is contained in:
Ernest Wong 2018-11-15 10:27:03 +13:00 committed by Fabian
parent 8b64844d27
commit dfb47f5907

View file

@ -7,6 +7,7 @@ const fs = require("fs");
const testfsjson = require("./testfs.json");
const SHOW_LOGS = false;
const STOP_ON_FIRST_FAILURE = false;
function log_pass(msg, ...args)
{
@ -1807,6 +1808,11 @@ function report_test()
else
{
log_fail("Test #%d failed: %s", test_num, tests[test_num].name);
if(STOP_ON_FIRST_FAILURE)
{
finish_tests();
}
}
test_has_failed = false;
}