Skip to content

Commit

Permalink
ci: Update bfs to 4.0
Browse files Browse the repository at this point in the history
And fix diff-bfs.sh for the new test result format.
  • Loading branch information
tavianator committed Aug 16, 2024
1 parent d9d2a4e commit 0492e01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
with:
repository: tavianator/bfs
path: bfs
ref: "3.1.3"
ref: "4.0"
- name: Install `rust` toolchain
run: |
## Install `rust` toolchain
Expand Down
11 changes: 6 additions & 5 deletions util/build-bfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ fi
cargo build --release
FIND=$(readlink -f target/release/find)

cd ..
make -C bfs -j "$(nproc)" bin/tests/{mksock,xtouch} NOLIBS=y
cd ../bfs
./configure NOLIBS=y
make -j "$(nproc)" bin/tests/{mksock,xtouch}

# Run the GNU find compatibility tests by default
if test "$#" -eq 0; then
set -- --verbose=tests --gnu --sudo
fi

LOG_FILE=bfs/tests.log
./bfs/tests/tests.sh --bfs="$FIND" "$@" | tee "$LOG_FILE" || :
LOG_FILE=tests.log
./tests/tests.sh --bfs="$FIND" "$@" 2>&1 | tee "$LOG_FILE" || :

PASS=$(sed -En 's|^\[PASS] *([0-9]+) / .*|\1|p' "$LOG_FILE")
SKIP=$(sed -En 's|^\[SKIP] *([0-9]+) / .*|\1|p' "$LOG_FILE")
Expand Down Expand Up @@ -49,4 +50,4 @@ jq -n \
--arg pass "$PASS" \
--arg skip "$SKIP" \
--arg fail "$FAIL" \
'{($date): { sha: $sha, total: $total, pass: $pass, skip: $skip, fail: $fail, }}' > bfs-result.json
'{($date): { sha: $sha, total: $total, pass: $pass, skip: $skip, fail: $fail, }}' > ../bfs-result.json
2 changes: 1 addition & 1 deletion util/diff-bfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export LC_COLLATE=C

# Extract the failing test lines from log files
failing_tests() {
sed -n 's/^\([[:print:]]\+\) failed\!/\1/p' "$1" | sort
sed -n 's/^\[FAIL\] //p' "$1" | sort
}

comm -3 <(failing_tests "$1") <(failing_tests "$2") | tr '\t' ',' | while IFS=, read old new; do
Expand Down

0 comments on commit 0492e01

Please sign in to comment.