From 28989171ab2e40c9aabd30713db3cda75b8c53ca Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 7 Sep 2021 23:01:43 +0200 Subject: [PATCH] add a script to run the tests with the GNU testsuite --- util/build-gnu.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 util/build-gnu.sh diff --git a/util/build-gnu.sh b/util/build-gnu.sh new file mode 100644 index 0000000..dbaa774 --- /dev/null +++ b/util/build-gnu.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e +if test ! -d ../findutils.gnu; then + echo "Could not find ../findutils.gnu" + echo "git clone https://git.savannah.gnu.org/git/findutils.git findutils.gnu" + exit 1 +fi + +# build the rust implementation +cargo build --release +cp target/release/find ../findutils.gnu/find.rust + +# Clone and build upstream repo +cd ../findutils.gnu +./bootstrap +./configure --quiet --disable-gcc-warnings +make -j "$(nproc)" + +# overwrite the GNU version with the rust impl +cp find.rust find/find + +# Run the tests +make check-TESTS