automake-patches
[Top][All Lists]
Advanced

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

Re: [RFC+PATCHES] Refactoring `tests/defs.in'.


From: Stefano Lattarini
Subject: Re: [RFC+PATCHES] Refactoring `tests/defs.in'.
Date: Thu, 2 Sep 2010 22:26:27 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Thursday 02 September 2010, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Thu, Sep 02, 2010 at 08:59:44PM CEST:
> > Do you have any particualr suggestion on how to create a new
> > remote branch the right way?  Is 'git push orig tests-init'
> > enough?
> 
> I think so.  I usually use --dry-run first to see what would
> happen. IIRC you may still have to explicitly make tests-init a
> tracking branch of origin/tests-init afterwards though; I just do
> that by creating a respective entry in '.git/config'.
Thanks for the tips.

> > However, I want to keep the part that converts tabs into spaces
> > in indentations.
> 
> This part is fine with me.

I pushed the attached patches to the new branch 'tests-init'.

Regards,
   Stefano
From e1482fda4a5702348a5cfe726c9ea8af476450ad Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 2 Jun 2010 21:23:34 +0200
Subject: [PATCH 1/2] Improve code for requiring libtool and gettext in tests.

* tests/defs.in: Stricter (and more correct) detection of wheter
libtool, libtoolize and/or gettext are in $required.
---
 ChangeLog     |    6 ++++++
 tests/defs.in |   10 +++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 57918e9..be0a240 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-02  Stefano Lattarini  <address@hidden>
+
+       Improve code for requiring libtool and gettext in tests.
+       * tests/defs.in: Stricter (and more correct) detection of wheter
+       libtool, libtoolize and/or gettext are in $required.
+
 2010-08-31  Peter Rosin  <address@hidden>
 
        Do file name conversion for object files in the compile wrapper.
diff --git a/tests/defs.in b/tests/defs.in
index b5cc99e..8544dbc 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -343,8 +343,8 @@ echo "=== Running test $0"
 # files from an old version of Automake that we don't want to use.
 # Use `-Wno-syntax' because we do not want our test suite to fail because
 # some third-party .m4 file is underquoted.
-case $required in
-  *libtool* | *gettext* )
+case " $required " in
+  *' libtool '* | *' libtoolize '* | *' gettext '* )
     aclocaldir='@prefix@/share/aclocal'
     extra_includes=""
     if test -f $aclocaldir/dirlist; then
@@ -365,9 +365,9 @@ case $required in
          gettext_found=yes
        fi
     done
-    case $required in
-      *libtool* ) test $libtool_found = yes || Exit 77 ;;
-      *gettext* ) test $gettext_found = yes || Exit 77 ;;
+    case " $required " in
+      *' libtool '* | *' libtoolize '* ) test $libtool_found = yes || Exit 77 
;;
+      *' gettext '* ) test $gettext_found = yes || Exit 77 ;;
     esac
     # Libtool cannot cope with spaces in the build tree.  Our testsuite setup
     # cannot cope with spaces in the source tree name for Libtool and gettext
-- 
1.7.1

From 95f2b76562c4358589c9527a622b905d024cad1d Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Thu, 2 Sep 2010 21:44:55 +0200
Subject: [PATCH 2/2] Tests defs: make spacing more consistent.

* tests/defs.in: Make spacing more consistent in indentation.
Especially, indent using only spaces, not tabs.  Also, move
a comment to a better position.
---
 ChangeLog     |    5 +++++
 tests/defs.in |   32 ++++++++++++++++----------------
 2 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index be0a240..572a37e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-09-02  Stefano Lattarini  <address@hidden>
 
+       Tests defs: make spacing more consistent.
+       * tests/defs.in: Make spacing more consistent in indentation.
+       Especially, indent using only spaces, not tabs.  Also, move
+       a comment to a better position.
+
        Improve code for requiring libtool and gettext in tests.
        * tests/defs.in: Stricter (and more correct) detection of wheter
        libtool, libtoolize and/or gettext are in $required.
diff --git a/tests/defs.in b/tests/defs.in
index 8544dbc..fe2dbaf 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -202,11 +202,11 @@ do
     rst2html)
       # Try the variants that are tried in check.am.
       while :; do
-       for r2h in $RST2HTML rst2html rst2html.py; do
-         echo "$me: running $r2h --version"
-         $r2h --version && break 2
-       done
-       exit 77
+        for r2h in $RST2HTML rst2html rst2html.py; do
+          echo "$me: running $r2h --version"
+          $r2h --version && break 2
+        done
+        exit 77
       done
       ;;
     runtest)
@@ -226,8 +226,8 @@ do
       echo "$me: running texi2dvi -o /dev/null --version"
       ( texi2dvi -o /dev/null --version ) || exit 77
       ;;
-    # Generic case: the tool must support --version.
     *)
+      # Generic case: the tool must support --version.
       echo "$me: running $tool --version"
       ( $tool --version ) || exit 77
       ;;
@@ -357,23 +357,23 @@ case " $required " in
     libtool_found=no
     gettext_found=no
     for d in $extra_includes $aclocaldir ; do
-       test "x$d" != x-I || continue
-       if test -f "$d/libtool.m4"; then
-         libtool_found=yes
-       fi
-       if test -f "$d/gettext.m4"; then
-         gettext_found=yes
-       fi
+      test "x$d" != x-I || continue
+      if test -f "$d/libtool.m4"; then
+        libtool_found=yes
+      fi
+      if test -f "$d/gettext.m4"; then
+        gettext_found=yes
+      fi
     done
     case " $required " in
-      *' libtool '* | *' libtoolize '* ) test $libtool_found = yes || Exit 77 
;;
-      *' gettext '* ) test $gettext_found = yes || Exit 77 ;;
+      *' libtool '* | *' libtoolize '* ) test $libtool_found = yes || Exit 77;;
+      *' gettext '* ) test $gettext_found = yes || Exit 77;;
     esac
     # Libtool cannot cope with spaces in the build tree.  Our testsuite setup
     # cannot cope with spaces in the source tree name for Libtool and gettext
     # tests.
     case $srcdir,`pwd` in
-      *\ * | *\        *) Exit 77 ;;
+      *\ * | *\        *) Exit 77;;
     esac
     ACLOCAL="$ACLOCAL -Wno-syntax -I $srcdir/../m4 $extra_includes -I 
$aclocaldir"
     ;;
-- 
1.7.1


reply via email to

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