tests: avoid spurious failures due to fork failure in test setup
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 15 Jan 2011 08:07:21 +0000 (09:07 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 15 Jan 2011 08:07:21 +0000 (09:07 +0100)
* tests/defs: Ensure $me is always nonempty, to avoid spurious
failures on MinGW/MSYS in case the preceding sed command could
not be spawned.

ChangeLog
tests/defs

index 8f40d85..5a1f6f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-01-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       tests: avoid spurious failures due to fork failure in test setup
+       * tests/defs: Ensure $me is always nonempty, to avoid spurious
+       failures on MinGW/MSYS in case the preceding sed command could
+       not be spawned.
+
        Avoid configure warnings from wait about reused PIDs.
        * m4/sanity.m4 (AM_SANITY_CHECK): Hide wait stderr output.
        Fixes spurious failure of depcomp2.test.
index 64ed985..0f84d0a 100644 (file)
@@ -1,7 +1,8 @@
 # -*- shell-script -*-
 #
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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
@@ -31,6 +32,7 @@ test -f ./defs-static || {
 
 # The name of the current test (without the `.test' suffix.)
 me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+test -n "$me" || exit 99
 
 
 ## ---------------------------------------- ##