Now that --without-ssl works again, I thought it'd be a good time to finish Travis too.

Attached is an updated patch. Along with my other pending patch for fixing the test suite, this works perfectly and all tests currently pass.

As mentioned earlier, multicolumn character languages still have a bug. I will debug that as soon as I get some time. Till then, the test suite works only on the C locale.

I'd like to push this as soon as possible.
On 11/18, Tim Rühsen wrote:
Hi Darshit,

great work !

The Travis yml file is much cleaner than the ones that I use :-)

There is a small type: 'suppresion' should be 'suppression' (in the valgrind
suppression files).

Regards, Tim

On Wednesday 18 November 2015 00:17:41 Darshit Shah wrote:
It's been a while since I shared these patches. The fixes to make distcheck
went in before the last release, however, we still don't have Travis
integration. The API Tim linked to is valid only for private builds which
is a paid feature of Travis.

Since the Turkish tests were failing due to a bad translation, I've
currently removed it from the list of languages. Once we have the
translation fixed, we can add the Turkish language back into the tests. I'd
like to have that language in because of the specific corner case provided
in its character set.

Apart from that, I randomly picked and added Japanese against a language to
test against. This was chosen because it has multi-byte and multi-column
characters and I want to ensure that the progress bar works perfectly for
these. Turns out in one particular case it doesn't. Which is why the
current Travis setup fails too. Hence, I removed the language for now so
that we have a working Travis setup. However, that was a valid bug and we
need to look into fixing it.

Currently, the only build that fails is one with --without-ssl. While I
understand that this is a ridiculous idea in this day, but we provide a
configure option to build without SSL and should support it. I've left it
there since it's a more major issue we need to look into before the next
minor release.

Email notifications from Travis are not currently working. I will discuss
this on IRC with them tomorrow to see how we can fix this.

I've attached the new patch for Travis integration and will push it if no
one complains.

Eventually, I'd like to extend this travis file to cover OSX builds too. But
currently, the OSX environment seems to have some problems with Python that
requires some manual work. Hence, I've not included the OSX as a target OS
for testing in this patch.

On 10/11, Tim Rühsen wrote:
>Am Sonntag, 11. Oktober 2015, 12:32:14 schrieb Darshit Shah:
>> However, I did come across a small problem. Travis currently accepts
>> open source build requests from GitHub only. So I don't think we can
>> use it from Savannah. Would it be a problem if we pushed the
>> .travis.yml to master and allow the builds to be fired from one of our
>> GitHub clones?
>
>Hi Darshit,
>
>IMO there is no problem.
>
>If there is no possibility to trigger a build from Savannah, we have to use
>Github. Or we have to trigger it manually...
>
>That is something that other people already asked for:
>http://kamranicus.com/blog/2015/03/29/triggering-a-travis-build-programmati
>cally/
>
>Maybe you could give this a try (maybe using wget instead of curl ?).
>http://docs.travis-ci.com/user/triggering-builds/
>
>Regards, Tim

--
Thanking You,
Darshit Shah
From 2be700466560c172be7493d579668dcd13f94334 Mon Sep 17 00:00:00 2001
From: Darshit Shah <[email protected]>
Date: Thu, 3 Dec 2015 18:42:53 +0100
Subject: [PATCH] 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.
---
 .travis.yml                     |  50 ++++++++++++
 contrib/travis-ci               |  50 ++++++++++++
 tests/valgrind-suppressions     | 172 ++++++++++++++++++++++++++++++++++++++++
 tests/valgrind-suppressions-ssl | 138 ++++++++++++++++++++++++++++++++
 4 files changed, 410 insertions(+)
 create mode 100644 .travis.yml
 create mode 100755 contrib/travis-ci

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..bb9017b
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,50 @@
+sudo: no
+
+language: c
+
+compiler:
+    - gcc
+
+notifications:
+    email:
+        recipients:
+            - [email protected]
+            - [email protected]
+        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
diff --git a/contrib/travis-ci b/contrib/travis-ci
new file mode 100755
index 0000000..6694094
--- /dev/null
+++ b/contrib/travis-ci
@@ -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))"
diff --git a/tests/valgrind-suppressions b/tests/valgrind-suppressions
index 4026770..5393321 100644
--- a/tests/valgrind-suppressions
+++ b/tests/valgrind-suppressions
@@ -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
+}
diff --git a/tests/valgrind-suppressions-ssl b/tests/valgrind-suppressions-ssl
index 0250785..4373507 100644
--- a/tests/valgrind-suppressions-ssl
+++ b/tests/valgrind-suppressions-ssl
@@ -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
+}
-- 
2.6.3

Attachment: signature.asc
Description: PGP signature

Reply via email to