hurl/bin/test/test_integ.sh

40 lines
1007 B
Bash
Raw Normal View History

2022-12-14 11:28:25 +03:00
#!/bin/bash
set -Eeuo pipefail
2023-04-05 12:07:50 +03:00
set -x
2022-07-30 05:49:56 +03:00
echo "----- integration tests -----"
2022-10-04 16:31:38 +03:00
# hurl infos
2023-04-05 12:07:50 +03:00
command -v hurl || (echo "ERROR - hurl not found" ; exit 1)
command -v hurlfmt || (echo "ERROR - hurlfmt not found" ; exit 1)
2022-10-04 16:31:38 +03:00
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
2022-10-04 16:31:38 +03:00
# integration tests
cd integration/hurlfmt
./integration.py
./test_html_output.py tests_export/*.html
cd -
cd integration/hurl
2022-07-30 05:49:56 +03:00
./integration.py
2022-10-17 17:22:42 +03:00
./test_curl_commands.sh