Re: Fix distcc/ccache interferences with the test suite

2009-01-29 Thread Ralf Wildenhues
Hi Akim,

* Akim Demaille wrote on Tue, Jan 06, 2009 at 09:24:32AM CET:
 Le 6 janv. 09 à 07:48, Ralf Wildenhues a écrit :

 Are those the only distcc/ccache-induced failures?

 Yes, I had no other failures.

Thanks, and sorry for the delay.  In the meantime, the localization code
has seen some output normalization already; I'm adding another macro in
the same vein, and using your suggested code for it, and pushing the
result.  Can you check that it still fixes the issue?

Thanks!
Ralf

commit 3e0beef8eb35a734514d5c4871f19a32c5edb145
Author: Akim Demaille demai...@gostai.com
Date:   Thu Jan 29 18:39:58 2009 +0100

Normalize compiler output due to compiler wrappers.

* tests/testsuite.at (LT_AT_NORMALIZE_COMPILER_OUTPUT): New
macro, to normalize ccache and distcc output.
* tests/localization.at (localized compiler messages): Use it.

Signed-off-by: Ralf Wildenhues ralf.wildenh...@gmx.de

diff --git a/ChangeLog b/ChangeLog
index f7fd4d1..3c2871d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-01-29  Akim Demaille  demai...@gostai.com
+   Ralf Wildenhues  ralf.wildenh...@gmx.de
+
+   Normalize compiler output due to compiler wrappers.
+   * tests/testsuite.at (LT_AT_NORMALIZE_COMPILER_OUTPUT): New
+   macro, to normalize ccache and distcc output.
+   * tests/localization.at (localized compiler messages): Use it.
+
 2009-01-29  Peter Rosin  p...@lysator.liu.se
 
Make modified libtool script in cwrapper test executable
diff --git a/tests/localization.at b/tests/localization.at
index 92b19ac..119b38d 100644
--- a/tests/localization.at
+++ b/tests/localization.at
@@ -43,15 +43,13 @@ AT_CHECK([$CC $CPPFLAGS $CFLAGS -c b.c || exit 77], [], 
[stdout], [stderr])
 
 # Find out about expected output.
 AT_CHECK([$CC $CPPFLAGS $CFLAGS -c a.c || exit 1], [1], [stdout], [stderr])
-LT_AT_UNIFY_NL([stdout], [expected-stdout])
-LT_AT_UNIFY_NL([stderr], [expected-stderr])
+LT_AT_NORMALIZE_COMPILER_OUTPUT([stdout], [expected-stdout])
+LT_AT_NORMALIZE_COMPILER_OUTPUT([stderr], [expected-stderr])
 AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c || 
exit 1],
 [1], [stdout], [stderr])
-LT_AT_UNIFY_NL([stderr])
-AT_CHECK([diff expected-stderr stderr])
-LTBASE=`$ECHO $LIBTOOL | sed 's,^.*/,,'`
-grep -v ^$LTBASE: compile stdout  libtool-stdout
-LT_AT_UNIFY_NL([libtool-stdout])
+LT_AT_NORMALIZE_COMPILER_OUTPUT([stdout], [libtool-stdout])
+LT_AT_NORMALIZE_COMPILER_OUTPUT([stderr], [libtool-stderr])
+AT_CHECK([diff expected-stderr libtool-stderr])
 AT_CHECK([diff expected-stdout libtool-stdout])
 
 # check that we get our quoting right.
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 24e8174..92e786e 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -218,6 +218,20 @@ m4_define([LT_AT_UNIFY_NL],
 esac])
 
 
+# LT_AT_NORMALIZE_COMPILER_OUTPUT(FILE, [RESULT-FILE])
+# 
+# Normalize differences in compiler output stemming from, e.g.,
+# - distcc process numbers,
+# - ccache file location,
+# - newline encoding,
+# - location of the libtool script.
+m4_define([LT_AT_NORMALIZE_COMPILER_OUTPUT],
+[_ltbase=`$ECHO $LIBTOOL | sed 's,^.*/,,'`
+[sed /^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d  $1  $1.t]
+LT_AT_UNIFY_NL([$1.t], [m4_default([$2], [$1])])[]dnl
+])
+
+
 # LT_AT_EXEC_CHECK(EXECUTABLE, [STATUS = 0], [STDOUT], [STDERR],
 # [ARGS-OR-STATUS-ADJUST])
 # --




Re: Fix distcc/ccache interferences with the test suite

2009-01-06 Thread Akim Demaille


Le 6 janv. 09 à 07:48, Ralf Wildenhues a écrit :


Hi Akim,


Hi Ralf,


* Akim Demaille wrote on Mon, Jan 05, 2009 at 03:22:24PM CET:

Hi all,


Are those the only distcc/ccache-induced failures?


Yes, I had no other failures.



Fix distcc/ccache interferences with the test suite

2009-01-05 Thread Akim Demaille

Hi all,

From 02a3220b061f232d30baf1d1d3bc497d7e9417b8 Mon Sep 17 00:00:00 2001
From: Akim Demaille demai...@gostai.com
Date: Mon, 5 Jan 2009 15:10:55 +0100
Subject: [PATCH] Fix distcc/ccache interferences with the test suite.

* tests/localization.at (localized compiler messages): Ignore
distcc log messages.
---
 tests/localization.at |   18 +-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/tests/localization.at b/tests/localization.at
index d489fef..a338bda 100644
--- a/tests/localization.at
+++ b/tests/localization.at
@@ -1,6 +1,6 @@
 # localization.at -- libtool and locales-*- Autotest -*-
 #
-#   Copyright (C) 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 #   Written by Ralf Wildenhues, 2008
 #
 #   This file is part of GNU Libtool.
@@ -47,6 +47,22 @@ mv -f stdout expected-stdout
 mv -f stderr expected-stderr
 AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c || 
exit 1],
 [1], [stdout], [stderr])
+
+# Get rid of useless differences, such as distcc process numbers
+# and ccache file location.
+#
+# distcc[54517] ERROR: compile 
/Users/akim/.ccache/a.tmp.montero.gostai.ensta.fr.54506.i on localhost failed
+# a.c:1: error: size of array 'x' is negative
+# distcc[54506] ERROR: compile a.c on localhost failed
+#
+# Just ignore the whole line which only wraps the genuine compiler
+# error message.
+for f in expected-stdout expected-stderr stdout stderr
+do
+  sed -e '/^distcc\[[0-9]*\]/d' $f $f.tmp
+  mv -f $f.tmp $f
+done
+
 AT_CHECK([diff expected-stderr stderr])
 LTBASE=`$ECHO $LIBTOOL | sed 's,^.*/,,'`
 AT_CHECK([grep -v ^$LTBASE: compile stdout | diff expected-stdout -])
-- 
1.6.0.4.790.gaa14a





Re: Fix distcc/ccache interferences with the test suite

2009-01-05 Thread Ralf Wildenhues
Hi Akim,

* Akim Demaille wrote on Mon, Jan 05, 2009 at 03:22:24PM CET:
 Hi all,

Are those the only distcc/ccache-induced failures?

Thanks,
Ralf

 From 02a3220b061f232d30baf1d1d3bc497d7e9417b8 Mon Sep 17 00:00:00 2001
 From: Akim Demaille demai...@gostai.com
 Date: Mon, 5 Jan 2009 15:10:55 +0100
 Subject: [PATCH] Fix distcc/ccache interferences with the test suite.
 
   * tests/localization.at (localized compiler messages): Ignore
   distcc log messages.