Skip to content

Commit

Permalink
Correctly mark failed runs (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmior authored Sep 26, 2024
1 parent f9c6036 commit f1aad80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ all: dist/report.csv ; cat $<
define docker_run
$(eval $@_TOOL = $(1))
$(eval $@_INPUT = $(2))
$(shell docker run --rm -v $(CURDIR):/workspace jsonschema-benchmark/$($@_TOOL) $($@_INPUT) > $@)
-$(shell docker run --rm -v $(CURDIR):/workspace jsonschema-benchmark/$($@_TOOL) $($@_INPUT) > $@)
@if [ ! -s $@ ]; then echo "0" > $@ ; fi
@sed -i 's/$$/,$(.SHELLSTATUS)/' $@
@exit $(.SHELLSTATUS)
endef

# JSON Toolkit
Expand Down
7 changes: 3 additions & 4 deletions implementations/ajv/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ async function validateSchema(schemaPath, instancePath) {
console.log(durationNs.toFixed(0));

// Exit with non-zero status on validation failure
// XXX Skip since we allow ajv to fail
// if (failed) {
// process.exit(1);
// }
if (failed) {
process.exit(1);
}
}

if (process.argv.length !== 4) {
Expand Down

0 comments on commit f1aad80

Please sign in to comment.