From c6892bec243fd3c8118fa87885455a7e6ce87f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Tue, 19 Dec 2023 19:16:42 +0000 Subject: [PATCH] ci(validate-docx-golden-tests2): fail on errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The validator just prints errors, but always exited with nonzero. Signed-off-by: Edwin Török --- Makefile | 2 +- tools/validate-docx2.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tools/validate-docx2.sh diff --git a/Makefile b/Makefile index 2684d4284..e873aaf59 100644 --- a/Makefile +++ b/Makefile @@ -249,7 +249,7 @@ validate-docx-golden-tests2: ## validate docx golden tests using OOXMLValidator test -d ./OOXML-Validator || \ (git clone https://github.com/mikeebowen/OOXML-Validator.git \ && cd OOXML-Validator && dotnet build --configuration=Release) - dotnet run --configuration=Release --no-build --no-restore --project OOXML-Validator/OOXMLValidatorCLI -- test/docx/golden -r | json_reformat + sh ./tools/validate-docx2.sh test/docx/golden/ .PHONY: validate-docx-golden-tests2 validate-epub: ## generate an epub and validate it with epubcheck diff --git a/tools/validate-docx2.sh b/tools/validate-docx2.sh new file mode 100644 index 000000000..65827452e --- /dev/null +++ b/tools/validate-docx2.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eu + +(for i in "$@"; do + dotnet run --configuration=Release --no-build --no-restore --project OOXML-Validator/OOXMLValidatorCLI -- "${i}" -r +done) >validation +json_reformat -s