Skip to content

Commit

Permalink
Check that hurl has been built with libcurl dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricereix committed Aug 14, 2023
1 parent dd74ee7 commit 31a8701
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bin/test/test_integ.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ command -v hurlfmt || (echo "ERROR - hurlfmt not found" ; exit 1)
hurl --version
hurlfmt --version

# Check that hurl is dynamically linked with libcurl
# if libcurl-dev is not installed, Hurl is built implicitly with an old static libcurl
# https://github.com/alexcrichton/curl-rust/issues/523
# TODO: Add MacOS
if [[ "$(uname -s)" = "Linux*" ]]; then
libcurl_lib=$(ldd "$(which hurl)" | grep libcurl || test $? = 1)
if [ -z "$libcurl_lib" ]; then
echo "hurl has not been built with libcurl dynamically"
echo "you are probably missing the libcurl-dev package"
exit 1
else
echo "Using libcurl library"
echo "$libcurl_lib"
fi
fi


# integration tests
cd integration
./hurlfmt_check.sh tests_ok/*.hurl tests_failed/*.hurl
Expand Down

0 comments on commit 31a8701

Please sign in to comment.