Skip to content

Commit cead712

Browse files
committed
ci: Fix GNU testsuite comparison
The uploaded log artifact maintains the directory structure, so just compare it directly to the GNU find directory.
1 parent 193aaf2 commit cead712

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

.github/workflows/compat.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ jobs:
7070
- name: Compare failing tests against master
7171
shell: bash
7272
run: |
73-
mkdir -p ./logs
74-
cp findutils.gnu/{tests,{find,xargs}/testsuite}/*.log ./logs
75-
./findutils/util/diff-gnu.sh dl logs
73+
./findutils/util/diff-gnu.sh ./dl ./findutils.gnu
7674
- name: Compare against main results
7775
shell: bash
7876
run: |

util/diff-gnu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ export LC_COLLATE=C
66

77
# Extract the failing test lines from log files
88
failing_tests() {
9-
sed -En 's/FAIL: ([^,:]*)[,:].*/\1/p' "$@" | sort
9+
sed -En 's/FAIL: ([^,:]*)[,:].*/\1/p' "$1"/{tests,{find,xargs}/testsuite}/*.log | sort
1010
}
1111

12-
comm -3 <(failing_tests $1/*.log) <(failing_tests $2/*.log) | tr '\t' ',' | while IFS=, read old new foo; do
12+
comm -3 <(failing_tests "$1") <(failing_tests "$2") | tr '\t' ',' | while IFS=, read old new foo; do
1313
if [ -n "$old" ]; then
1414
echo "::warning ::Congrats! The GNU test $old is now passing!"
1515
fi

0 commit comments

Comments
 (0)