Skip to content

Commit

Permalink
test: keep b59 output as logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Dec 5, 2023
1 parent 26e4b56 commit f9a012b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist
node_modules
*.received.*
*.log
4 changes: 2 additions & 2 deletions test/check-metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ for file in "$SCRIPT_PATH"/"$profile"/valid*.ttl; do

name=$(basename "$file")
{
npx barnard59 cube check-metadata --profile "$profilePath" > /dev/null 2>&1
npx barnard59 cube check-metadata --profile "$profilePath" > /dev/null 2>"$file.log"
success=$?
} < "$file"

Expand All @@ -64,7 +64,7 @@ for file in "$SCRIPT_PATH"/"$profile"/invalid*.ttl; do
fi

name=$(basename "$file")
report=$(npx barnard59 cube check-metadata --profile "$profilePath" < "$file" 2> /dev/null | "$SCRIPT_PATH"/pretty-print.mjs)
report=$(npx barnard59 cube check-metadata --profile "$profilePath" < "$file" 2> "$file.log" | "$SCRIPT_PATH"/pretty-print.mjs)

if ! echo "$report" | approvals "$name" --outdir "$SCRIPT_PATH"/"$profile" "$approvalsFlags" > /dev/null 2>&1 ; then
"$SCRIPT_PATH"/report-failure.sh "$file" "$(cat "$profilePath")" "$(cat "$file")" "check results"
Expand Down
2 changes: 1 addition & 1 deletion test/check-observations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ for file in "$SCRIPT_PATH"/observations/*.ttl; do
fi

name=$(basename "$file")
report=$(npx barnard59 cube check-observations --constraint "$file" < "$file" 2> /dev/null | "$SCRIPT_PATH"/pretty-print.mjs)
report=$(npx barnard59 cube check-observations --constraint "$file" < "$file" 2> "$file.log" | "$SCRIPT_PATH"/pretty-print.mjs)

if ! echo "$report" | approvals "$name" --outdir "$SCRIPT_PATH"/observations "$approvalsFlags" > /dev/null 2>&1 ; then
"$SCRIPT_PATH"/report-failure.sh "$file" "$(cat "$file")" "$(cat "$file")" "check results"
Expand Down

0 comments on commit f9a012b

Please sign in to comment.