Debian Codegraph @

util/yaml-test-suite

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 # Copyright 2025 The go-yaml Project Contributors
4 # SPDX-License-Identifier: Apache-2.0
5
6 set -euo pipefail
7
8 mainscip-shell shell shell-project 0.0.0 main().() (
9 type=$1
10
11 if [[ $type == all ]]; then
12 export RUNALL=1
13 elif [[ $type == fail ]]; then
14 export RUNFAILING=1
15 else
16 exit 1
17 fi
18
19 results=$(
20 goscip-shell system . . go. test ./yts -count=1 -v |
21 awkscip-shell system . . awk. '/ --- (PASS|FAIL): / {print $2, $3}scip-shell filesystem . . `/ --- (PASS|FAIL): / {print $2, $3}`.'
22 ) || truescip-shell system . . true.
23
24 known_count=$(grepscip-shell system . . grep. -c '' yts/known-failing-tests)
25 pass_count=$(grepscip-shell system . . grep. -c '^PASS:' <<<"$results")
26 fail_count=$(grepscip-shell system . . grep. -c '^FAIL:' <<<"$results")
27
28 echoscip-shell system . . echo. "PASS: $pass_count"
29 echoscip-shell system . . echo. "FAIL: $fail_count (known: $known_count)"
30
31 if [[ $type == fail ]] && [[ $pass_count -gt 0 ]]; then
32 echoscip-shell system . . echo. "ERROR: Found passing tests among expected failures:"
33 grepscip-shell system . . grep. '^PASS:' "$results"
34 exit 1
35 fi
36
37 if [[ $fail_count != "$known_count" ]]; then
38 echoscip-shell system . . echo. "ERROR: FAIL count ($fail_count) differs from expected $known_count"
39 exit 1
40 fi
41 )
42
43 mainscip-shell shell shell-project 0.0.0 main(). "$@"