From cdf8817856cdf9a91baa95942241b05fbae452b7 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sat, 15 Jan 2011 09:07:21 +0100 Subject: [PATCH] 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. --- ChangeLog | 5 +++++ tests/defs | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8f40d8501..5a1f6f111 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-01-15 Ralf Wildenhues + 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. diff --git a/tests/defs b/tests/defs index 64ed9856b..0f84d0a63 100644 --- a/tests/defs +++ b/tests/defs @@ -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 ## ---------------------------------------- ## -- 2.47.2