Introduce Travis Integration

* .travis.yml: Configuration file for Travis-CI
* contrib/travis-ci: Script to run on travis. Similar to check-hard but modified
  for travis.
* tests/valgrind-suppressions{-ssl}: Add extra suppressions to prevent a
Valgrind False Positive errors in an old version

Since Travis currently supports only public repositories on GitHub, the support
for automated testing through Travis will be done using my Clone of Wget on
GitHub at: https://github.com/darnir/wget.git
Any commits pushed to this repository will trigger a build on Travis.
This commit is contained in:
Darshit Shah 2015-12-03 18:42:53 +01:00
parent ca0c272eae
commit b0d2fa5748
4 changed files with 410 additions and 0 deletions

50
.travis.yml Normal file
View File

@ -0,0 +1,50 @@
sudo: no
language: c
compiler:
- gcc
notifications:
email:
recipients:
- darnir@gmail.com
- bug-wget@gnu.org
on_success: change
on_failure: always
env:
global:
- PERLLIB=$PERLLIB:../../tests
- PERL5LIB=$PERL5LIB:../../tests
matrix:
- SSL=""
- SSL="openssl"
- SSL="gnutls"
addons:
apt:
packages:
- automake
- autoconf
- autopoint
- flex
- texinfo
- pkg-config
- libgnutls-dev
- libssl-dev
- make
- libhttp-daemon-perl
- libio-socket-ssl-perl
- libidn11-dev
- gettext
- texlive
- python3
- valgrind
- language-pack-tr
- language-pack-ja
script:
- make distclean || true
- ./bootstrap
- ./contrib/travis-ci $SSL

50
contrib/travis-ci Executable file
View File

@ -0,0 +1,50 @@
#!/bin/bash
# Set a stricter bash mode
set -e
set -u
SSL=${1:-""}
case $SSL in
"") SSL_LIB="--without-ssl";;
"openssl") SSL_LIB="--with-ssl=openssl";;
"gnutls") SSL_LIB="--with-ssl=gnutls";;
esac
# For some reason. /proc/cpuinfo reports 16 cores on Travis, while the docs
# claim that each instance has only 2 cores. We believe the docs and force a
# value of only 2 here.
CORES=2
# Define a large number of Warning flags for the compiler. Hopefully, someone
# will sit and analyze the output to clean the warnings from the codebase.
CFLAGS="-std=c89 -pedantic -O2 -Wall -Wextra -Wstrict-prototypes -Wold-style-definition -Wwrite-strings -Wshadow -Wformat -Wformat-security -Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition"
# A cachefile for ./configure. I'm not sure if this is any useful.
CACHEFILE=$PWD/config_check.cache
# measure time consumed and print it at the end of the script
START=$(date +%s)
# the compiler changed, so we have to remove the cache file here
rm -f "$CACHEFILE"
for options in "" "--disable-ipv6"; do
export DISTCHECK_CONFIGURE_FLAGS="-C --cache-file=$CACHEFILE --enable-assert --enable-valgrind-tests $SSL_LIB $options"
echo " ./configure $DISTCHECK_CONFIGURE_FLAGS CFLAGS=\"$CFLAGS\""
./configure $DISTCHECK_CONFIGURE_FLAGS CFLAGS="$CFLAGS"
# We would like to have more languages tested here. Currently, there is a
# problem in the translations file for Turkish which causes the progress bar
# to assert fail. Apart from that, at least one another language with multi
# byte and multi column characters.
# TODO: Add Japanese and Turkish LANG for test
for xLCALL in C; do
export TESTS_ENVIRONMENT="LC_ALL=$xLCALL VALGRIND_TESTS=1"
echo " TESTS_ENVIRONMENT=\"$TESTS_ENVIRONMENT\" make distcheck CFLAGS=$CFLAGS -j$CORES"
make distcheck CFLAGS="$CFLAGS" -j$CORES
done
done
END=$(date +%s)
echo "Duration: $((END-START))"

View File

@ -6,3 +6,175 @@
fun:idn_encode
fun:url_parse
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:modify_param_name
fun:extract_param
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:modify_param_name
fun:extract_param
fun:parse_set_cookie
fun:cookie_handle_set_cookie
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:modify_param_name
fun:extract_param
fun:parse_set_cookie
fun:cookie_handle_set_cookie
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
<insert_a_suppression_name_here>
Memcheck:Cond
fun:memrchr
fun:extract_param
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
<insert_a_suppression_name_here>
Memcheck:Cond
fun:memrchr
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
<insert_a_suppression_name_here>
Memcheck:Cond
fun:memrchr
fun:extract_param
fun:parse_set_cookie.constprop.4
fun:cookie_handle_set_cookie
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}

View File

@ -26,3 +26,141 @@
...
obj:*/libcrypto.so.*
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:modify_param_name
fun:extract_param
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
...
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:modify_param_name
fun:extract_param
fun:parse_set_cookie
fun:cookie_handle_set_cookie
fun:gethttp
fun:http_loop
fun:retrieve_url
...
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:modify_param_name
fun:extract_param
fun:parse_set_cookie
fun:cookie_handle_set_cookie
fun:gethttp
fun:http_loop
fun:retrieve_url
...
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}
{
Valgrind 3.4 bug suppression
Memcheck:Cond
fun:memrchr
fun:parse_content_disposition
fun:check_file_output
fun:gethttp
fun:http_loop
fun:retrieve_url
fun:main
}