File: diff-bfs.sh

package info (click to toggle)
rust-findutils 0.8.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,252 kB
  • sloc: sh: 129; python: 31; makefile: 9
file content (19 lines) | stat: -rwxr-xr-x 509 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

set -eu

export LC_COLLATE=C

# Extract the failing test lines from log files
failing_tests() {
    sed -En 's/^\[FAIL\] (.*[a-z].*)/\1/p' "$1" | sort
}

comm -3 <(failing_tests "$1") <(failing_tests "$2") | tr '\t' ',' | while IFS=, read old new; do
    if [ -n "$old" ]; then
        echo "::warning ::Congrats! The bfs test $old is now passing!"
    fi
    if [ -n "$new" ]; then
        echo "::error ::bfs test failed: $new. $new is passing on 'main'. Maybe you have to rebase?"
    fi
done