#! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2013 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
# Check that distributed broken symlinks cause 'make dist' to fail, and
# to do so with (mostly) meaningful diagnostic.
-. ./defs || Exit 1
+. test-init.sh
# We need, for our broken symlinks, names that make it hard to get false
# positives when grepping make output to look for them.
ln -s $lnk1 $lnka
ln -s $lnka $lnkb
-# Sanity checks. Use 'test -r', since Solaris Sh doesn't grok 'test -e'.
-test ! -r $lnk1
-test ! -r $lnk2
-test ! -r $lnka
-test ! -r $lnkb
+# Sanity checks.
+test ! -e $lnk1
+test ! -e $lnk2
+test ! -e $lnka
+test ! -e $lnkb
test -h $lnk1
test -h $lnk2
test -h $lnka
$AUTOMAKE
./configure
# Distribution must fail, with a decent error message.
- $MAKE distdir >out 2>&1 && { cat out; Exit 1; }
- cat out
- $FGREP $lnk out
+ run_make -M -e FAIL distdir
+ $FGREP $lnk output
done
: