ci: Update bfs to 4.0 (#446)

And fix diff-bfs.sh for the new test result format.
This commit is contained in:
Tavian Barnes
2024-08-17 03:13:30 -04:00
committed by GitHub
parent d9d2a4e865
commit abf851dd7d
3 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -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
+6 -5
View File
@@ -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")
@@ -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
+1 -1
View File
@@ -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 -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