[Top][All Lists]

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

[PATCH] Fix sloppy tests for silent rules

From: Ludovic Courtès
Subject: [PATCH] Fix sloppy tests for silent rules
Date: Mon, 05 Jul 2010 18:00:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)


I noticed on NixOS GNU/Linux that silent*.test would randomly fail (see
<http://hydra.nixos.org/build/477516>.)  The reason is that these tests
would fail if “mv” is found in the standard output of ‘make’, but the
random build directory names used by Nix could very well contain this

The patch below makes the tests slightly more robust in this respect.
I’m not sure if this syntax for word boundaries is portable across
‘grep’ implementations, though.


--- /home/ludo/src/nixpkgs/automake-1.11.1/tests/silent.test~   2009-12-08 
19:02:32.000000000 +0100
+++ /home/ludo/src/nixpkgs/automake-1.11.1/tests/silent.test    2010-07-05 
13:15:20.000000000 +0200
@@ -1,9 +1,9 @@
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010  Free Software Foundation, Inc.
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# the Free Software Foundation; either version 3, or (at your option)
 # any later version.
 # This program is distributed in the hope that it will be useful,
@@ -65,7 +65,7 @@ $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep ' -c' stdout && Exit 1
 grep ' -o foo' stdout && Exit 1
-grep mv stdout && Exit 1
+grep '\<mv\>' stdout && Exit 1
 grep 'CC    .*foo\.' stdout
 grep 'CC .*bar\.' stdout
 grep 'CC .*baz\.' stdout

reply via email to

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