| 1 |
#!/bin/bash |
| 2 |
set -eo pipefail |
| 3 |
|
| 4 |
./buildconf |
| 5 |
|
| 6 |
if [ "$T" = "coverage" ]; then |
| 7 |
./configure --enable-debug --disable-shared --disable-threaded-resolver --enable-code-coverage --enable-werror --enable-alt-svc --with-libssh2 |
| 8 |
make |
| 9 |
make TFLAGS=-n test-nonflaky |
| 10 |
make "TFLAGS=-n -e" test-nonflaky |
| 11 |
tests="1 200 300 500 700 800 900 1000 1100 1200 1302 1400 1502 3000" |
| 12 |
make "TFLAGS=-n -t $tests" test-nonflaky |
| 13 |
coveralls --gcov /usr/bin/gcov-8 --gcov-options '\-lp' -i src -e lib -e tests -e docs -b $PWD/src |
| 14 |
coveralls --gcov /usr/bin/gcov-8 --gcov-options '\-lp' -e src -i lib -e tests -e docs -b $PWD/lib |
| 15 |
fi |
| 16 |
|
| 17 |
if [ "$T" = "torture" ]; then |
| 18 |
./configure --enable-debug --disable-shared --disable-threaded-resolver --enable-code-coverage --enable-werror --enable-alt-svc --with-libssh2 |
| 19 |
make |
| 20 |
make TFLAGS=-n test-nonflaky |
| 21 |
make "TFLAGS=-n -e" test-nonflaky |
| 22 |
tests="1 200 300 500 700 800 900 1000 1100 1200 1302 1400 1502 3000" |
| 23 |
make "TFLAGS=-n --shallow=40 -t $tests" test-nonflaky |
| 24 |
fi |
| 25 |
|
| 26 |
if [ "$T" = "debug" ]; then |
| 27 |
./configure --enable-debug --enable-werror $C |
| 28 |
make |
| 29 |
make examples |
| 30 |
if [ -z $NOTESTS ]; then |
| 31 |
if [ "$TRAVIS_ARCH" = "aarch64" ] ; then |
| 32 |
# TODO: find out why this test is failing on arm64 |
| 33 |
make "TFLAGS=-n !323" test-nonflaky |
| 34 |
else |
| 35 |
make TFLAGS=-n test-nonflaky |
| 36 |
fi |
| 37 |
fi |
| 38 |
fi |
| 39 |
|
| 40 |
if [ "$T" = "debug-wolfssl" ]; then |
| 41 |
./configure --enable-debug --enable-werror $C |
| 42 |
make |
| 43 |
make "TFLAGS=-n !313" test-nonflaky |
| 44 |
fi |
| 45 |
|
| 46 |
if [ "$T" = "debug-mesalink" ]; then |
| 47 |
./configure --enable-debug --enable-werror $C |
| 48 |
make |
| 49 |
make "TFLAGS=-n !313 !3001" test-nonflaky |
| 50 |
fi |
| 51 |
|
| 52 |
if [ "$T" = "novalgrind" ]; then |
| 53 |
./configure --enable-werror $C |
| 54 |
make |
| 55 |
make examples |
| 56 |
make TFLAGS=-n test-nonflaky |
| 57 |
fi |
| 58 |
|
| 59 |
if [ "$T" = "normal" ]; then |
| 60 |
if [ $TRAVIS_OS_NAME = linux ]; then |
| 61 |
# Remove system curl to make sure we don't rely on it. |
| 62 |
# Only done on Linux since we're not permitted to on mac. |
| 63 |
sudo rm -f /usr/bin/curl |
| 64 |
fi |
| 65 |
./configure --enable-warnings --enable-werror $C |
| 66 |
make |
| 67 |
make examples |
| 68 |
if [ -z $NOTESTS ]; then |
| 69 |
make test-nonflaky |
| 70 |
fi |
| 71 |
if [ -n $CHECKSRC ]; then |
| 72 |
echo "enable COPYRIGHTYEAR" > ./docs/examples/.checksrc |
| 73 |
echo "enable COPYRIGHTYEAR" > ./include/curl/.checksrc |
| 74 |
make checksrc |
| 75 |
fi |
| 76 |
fi |
| 77 |
|
| 78 |
if [ "$T" = "tidy" ]; then |
| 79 |
./configure --enable-warnings --enable-werror $C |
| 80 |
make |
| 81 |
make tidy |
| 82 |
fi |
| 83 |
|
| 84 |
if [ "$T" = "iconv" ]; then |
| 85 |
source scripts/travis/iconv-env.sh |
| 86 |
./configure --enable-debug --enable-werror $C |
| 87 |
make |
| 88 |
make examples |
| 89 |
make test-nonflaky |
| 90 |
fi |
| 91 |
|
| 92 |
if [ "$T" = "cmake" ]; then |
| 93 |
if [ $TRAVIS_OS_NAME = linux ]; then |
| 94 |
cmake -H. -Bbuild -DCURL_WERROR=ON |
| 95 |
cmake --build build |
| 96 |
else |
| 97 |
cmake -H. -Bbuild -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON |
| 98 |
cmake --build build |
| 99 |
fi |
| 100 |
fi |
| 101 |
|
| 102 |
if [ "$T" = "distcheck" ]; then |
| 103 |
# find BOM markers and exit if we do |
| 104 |
! git grep `printf '\xef\xbb\xbf'` |
| 105 |
./configure |
| 106 |
make |
| 107 |
./maketgz 99.98.97 |
| 108 |
# verify in-tree build - and install it |
| 109 |
tar xf curl-99.98.97.tar.gz |
| 110 |
cd curl-99.98.97 |
| 111 |
./configure --prefix=$HOME/temp |
| 112 |
make |
| 113 |
make TFLAGS=1 test |
| 114 |
make install |
| 115 |
# basic check of the installed files |
| 116 |
cd .. |
| 117 |
bash scripts/installcheck.sh $HOME/temp |
| 118 |
rm -rf curl-99.98.97 |
| 119 |
# verify out-of-tree build |
| 120 |
tar xf curl-99.98.97.tar.gz |
| 121 |
touch curl-99.98.97/docs/{cmdline-opts,libcurl}/Makefile.inc |
| 122 |
mkdir build |
| 123 |
cd build |
| 124 |
../curl-99.98.97/configure |
| 125 |
make |
| 126 |
make TFLAGS='-p 1 1139' test |
| 127 |
# verify cmake build |
| 128 |
cd .. |
| 129 |
rm -rf curl-99.98.97 |
| 130 |
tar xf curl-99.98.97.tar.gz |
| 131 |
cd curl-99.98.97 |
| 132 |
mkdir build |
| 133 |
cd build |
| 134 |
cmake .. |
| 135 |
make |
| 136 |
cd ../.. |
| 137 |
fi |
| 138 |
|
| 139 |
if [ "$T" = "fuzzer" ]; then |
| 140 |
# Download the fuzzer to a temporary folder |
| 141 |
./tests/fuzz/download_fuzzer.sh /tmp/curl_fuzzer |
| 142 |
|
| 143 |
export CURLSRC=$PWD |
| 144 |
|
| 145 |
# Run the mainline fuzzer test |
| 146 |
pushd /tmp/curl_fuzzer |
| 147 |
./mainline.sh ${CURLSRC} |
| 148 |
popd |
| 149 |
fi |
| 150 |
|
| 151 |
if [ "$T" = "scan-build" ]; then |
| 152 |
scan-build ./configure --enable-debug --enable-werror $C |
| 153 |
scan-build --status-bugs make |
| 154 |
scan-build --status-bugs make examples |
| 155 |
fi |