| 1 | # shellcheck shell=bash |
| 2 | # Paths and fixtures come from the derivation environment. |
| 3 | # shellcheck disable=SC2154 |
| 4 | while IFS=$'\t' read -r case names; do |
| 5 | case "$case" in ''|'#'*) continue ;; esac |
| 6 | mkdir -p "work/$case" |
| 7 | if python3 "$lint" \ |
| 8 | --tree "$graphs/rejected/$case" \ |
| 9 | --schema "$nodeSchema" \ |
| 10 | --work "work/$case" 2> "$case.err" |
| 11 | then |
| 12 | echo "knowledge-lint: expected graph '$case' to be rejected" >&2 |
| 13 | exit 1 |
| 14 | fi |
| 15 | if ! grep -qF -- "$names" "$case.err"; then |
| 16 | echo "knowledge-lint: '$case' was rejected without naming $names" >&2 |
| 17 | cat "$case.err" >&2 |
| 18 | exit 1 |
| 19 | fi |
| 20 | done < "$rejectedCases" |
| 21 | touch "$out" |