Skip to content

Commit

Permalink
Don't rely on GNU find in headers_test.sh (#12164)
Browse files Browse the repository at this point in the history
`-printf` is a GNU find extension, so `headers_test.sh` fails on systems where binutils is a BSD toolchain.

To get around this, use sed to obtain the effect of `-printf`.

Authors:
  - Lawrence Mitchell (https://github.com/wence-)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Ray Douglass (https://github.com/raydouglass)

URL: #12164
  • Loading branch information
wence- authored Nov 16, 2022
1 parent 73d73a7 commit ae101cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ci/checks/headers_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DIRNAMES="cudf cudf_test"

# existence tests for lib${LIBNAME}
for DIRNAME in ${DIRNAMES[@]}; do
HEADERS=`cd cpp && find include/${DIRNAME}/ -type f \( -iname "*.h" -o -iname "*.hpp" \) -printf " - test -f \\\$PREFIX/%p\n" | sort`
HEADERS=`cd cpp && find include/${DIRNAME} -type f \( -iname "*.h" -o -iname "*.hpp" \) -print | sed 's|^| - test -f $PREFIX/|' | sort`
META_TESTS=`grep -E "test -f .*/include/${DIRNAME}/.*\.h(pp)?" conda/recipes/lib${LIBNAME}/meta.yaml | sort`
HEADER_DIFF=`diff <(echo "$HEADERS") <(echo "$META_TESTS")`
LIB_RETVAL=$?
Expand Down

0 comments on commit ae101cc

Please sign in to comment.