[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] Script to check Wget status (for developers)

From: Darshit Shah
Subject: Re: [Bug-wget] [PATCH] Script to check Wget status (for developers)
Date: Sun, 7 Dec 2014 03:00:08 +0530
User-agent: Mutt/1.5.23 (2014-03-12)

On 12/05, Tim Rühsen wrote:

added a script to contrib that does some checks of the Wget project status,
e.g. usable before pushing commits to the repo.

Of course first of all for discussion and aimed at developers.

It is just a beginning and aggregates my manually checks.
Please feel free to comment /and/or to add more configure option combinations
or whatever.

Right now it stops on 'make check' with VALGRIND_TESTS=1. As known, the IDN
tests (perl suite) does not pass. I had a look at it and it seems to be a
false positive of valgrind. If you agree with me, I can supply a valgrind
suppression file to make the tests pass.

Also, gnulib seems not to be C89 compliant !?

Have fun.


From d3a1a6a3a7e0755a08b44d2a64a06e17bcdbf978 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <address@hidden>
Date: Fri, 5 Dec 2014 16:04:50 +0100
Subject: [PATCH] Added script contrib/check-hard to check Wget status

ChangeLog          |  4 ++++
contrib/check-hard | 47 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+)
create mode 100755 contrib/check-hard

diff --git a/ChangeLog b/ChangeLog
index 5f13bc1..4d5f096 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2014-12-05  Tim Ruehsen <address@hidden>

+       * contrib/check-hard: Added script to check Wget status
+2014-12-05  Tim Ruehsen <address@hidden>
        * configure.ac: Fix message for when GnuTLS has not been found.

2014-12-05  Tim Ruehsen <address@hidden>
diff --git a/contrib/check-hard b/contrib/check-hard
new file mode 100755
index 0000000..ae1c95c
--- /dev/null
+++ b/contrib/check-hard
@@ -0,0 +1,47 @@
+# +# Do some checking before 'git push'.
+# automatically exit on error
+set -e
+export CFLAGS="-std=c89 -pedantic -O2 -g -Wall -Wextra -Wstrict-prototypes 
-Wold-style-definition -Wwrite-strings -Wshadow -Wformat -Wformat-security 
-Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition"
Are we still going for C89 compatibility? I've been setting the -std=gnu99 flag till now. Maybe that's why I see fewer errors than you.

Except for Windows, for what other systems do we need to maintain strict C89 compliance?
+# measure time consumed and and print it at the end of the script
+START=$(date +%s.%N)
+echo "./bootstrap"
+./bootstrap >/dev/null
+for CC in gcc clang-3.6; do
+  export CC
+  echo "*** checking CC=$CC"
+  # the compiler changed, so we have to remove the cache file here
+  rm -f $CACHEFILE
+  for options in "" "--with-ssl=openssl"; do
We probably want to add a couple more such variations of options here. Specifically, check both openssl and gnutls backends.
+    export DISTCHECK_CONFIGURE_FLAGS="-C --cache-file=$CACHEFILE $options"
+    echo "  ./configure $DISTCHECK_CONFIGURE_FLAGS"
+    ./configure $DISTCHECK_CONFIGURE_FLAGS >/dev/null
+    for xVALGRIND in 0 1; do
+      for xLCALL in C tr_TR.utf8; do
This fails when the user doesn't already have the tr_TR.UTF-8 locale set up.
The script should not handle doing that, but it should atleast check and report to the user if the locale isn't available.
+        echo "    TESTS_ENVIRONMENT=\"$TESTS_ENVIRONMENT\"" make check
+        make check -j5 >/dev/null
If we're pushing this to the repo, let's remove the -j5 option. Not everyone uses a 6/8 core machine for development. I tried running this script on my dual core and a -j5 caused it to slow down considerably while taking up way too much memory.

We could handle reading this as a run time option.
+      done
+    done
+    echo "  make distcheck"
+    make distcheck -j5
+  done
+END=$(date +%s.%N)
+echo "Duration: "$(echo "$END - $START" | bc)

Also, this script seems to have a whitespace issue on line 28. My git complained about it before fixing it and merging with the local tree.

Else, this looks good.

Thanking You,
Darshit Shah

Attachment: pgpCq2_mvNIoR.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]