Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Update bfs to 2.6.2 #189

Merged
merged 1 commit into from
Oct 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions .github/workflows/compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
with:
repository: tavianator/bfs
path: bfs
ref: '2.6'
ref: '2.6.2'
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down Expand Up @@ -137,18 +137,7 @@ jobs:
- name: Compare failing tests against main
shell: bash
run: |
OLD_FAILING=$(sed -n "s/^\([[:print:]]\+\) failed\!/\1/p" dl/tests.log | sort)
NEW_FAILING=$(sed -n "s/^\([[:print:]]\+\) failed\!/\1/p" bfs/tests.log | sort)
for LINE in $OLD_FAILING; do
if ! grep -Fxq $LINE<<<"$NEW_FAILING"; then
echo "::warning ::Congrats! The bfs test $LINE is now passing!"
fi
done
for LINE in $NEW_FAILING; do
if ! grep -Fxq $LINE<<<"$OLD_FAILING"; then
echo "::error ::bfs test failed: $LINE. $LINE is passing on 'main'. Maybe you have to rebase?"
fi
done
./findutils/util/diff-bfs.sh dl/tests.log bfs/tests.log
- name: Compare against main results
shell: bash
run: |
Expand Down
19 changes: 19 additions & 0 deletions util/diff-bfs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -eu

export LC_COLLATE=C

# Extract the failing test lines from log files
failing_tests() {
sed -n 's/^\([[:print:]]\+\) failed\!/\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