>From 026972f5970d7d302bec1de48126c2c4bd1f4876 Mon Sep 17 00:00:00 2001 Message-Id: From: Stefano Lattarini Date: Sat, 10 Mar 2012 08:49:55 +0100 Subject: [PATCH] tests: avoid spurious failure under homebrew This change fixes the last bit of automake bug#10866. * tests/get-sysconf.test: When Homebrew spawns a build, even if from a project's VCS, it stages the files in a new temporary directory, instead of building directly from a VCS checkout. This behaviour was causing a spurious failure in this test, which expected to find either a ChangeLog file or a .git directory in the source directory (the former happening when the test was run from a distribution tarball, the latter when it was run from a git checkout). Work around the issue by explicitly recognizing when we're being run by Homebrew, and being more forgiving in that case. Signed-off-by: Stefano Lattarini --- tests/get-sysconf.test | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/tests/get-sysconf.test b/tests/get-sysconf.test index bad4735..0dbee2e 100755 --- a/tests/get-sysconf.test +++ b/tests/get-sysconf.test @@ -33,6 +33,13 @@ st=0 if test -d "$top_testsrcdir"/.git; then # We are running from a git checkout. git log -1 || st=1 +elif test -n "$HOMEBREW_CELLAR"; then + # We are very likely running under Homebrew. And when Homebrew spawns + # a build, even if from a project's VCS, it stages the files in a new + # temporary directory, instead of building directly from a VCS checkout. + # In this case, we can't expect to find neither a .git directory nor a + # ChangeLog file, so do nothing. + warn_ "running under Homebrew, some info won't be available" else # We are probably running from a distribution tarball, so # the ChangeLog file must be present. -- 1.7.9