[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: do not try to use ar(1) when AR specifies something else
From: |
Peter Rosin |
Subject: |
[PATCH] tests: do not try to use ar(1) when AR specifies something else |
Date: |
Wed, 29 Feb 2012 13:09:23 +0100 |
* tests/libobj10.test: Move the archive listing commands to the
Makefile, so that $AR - as determined by configure - can be
used.
* tests/libobj17.test: Likewise.
---
tests/libobj10.test | 5 ++++-
tests/libobj17.test | 13 +++++++++----
2 files changed, 13 insertions(+), 5 deletions(-)
Hi!
I ran the testsuite without ar(1) on PATH (and with AR=lib) and it
tripped on these buglets.
Ok for master?
Cheers,
Peter
diff --git a/tests/libobj10.test b/tests/libobj10.test
index a566b09..f19de74 100755
--- a/tests/libobj10.test
+++ b/tests/libobj10.test
@@ -36,6 +36,9 @@ BUILT_SOURCES = foo.c
CLEANFILES = foo.c
foo.c:
echo 'extern int dummy;' > $@
+.PHONY: debugging
+debugging:
+ $(AR) t libfoo.a
END
cp "$am_scriptdir/ar-lib" . || fatal_ "fetching auxiliary script 'ar-lib'"
@@ -47,7 +50,7 @@ $AUTOMAKE
./configure
$MAKE
-ar t libfoo.a # For debugging.
+$MAKE debugging
$MAKE distcheck
:
diff --git a/tests/libobj17.test b/tests/libobj17.test
index 0ced8d9..6c54a28 100755
--- a/tests/libobj17.test
+++ b/tests/libobj17.test
@@ -33,6 +33,13 @@ cat > Makefile.am << 'END'
noinst_LIBRARIES = libtu.a
libtu_a_SOURCES =
libtu_a_LIBADD = $(LIBOBJS)
+.PHONY: check-quux check-zardoz
+check-quux:
+ $(AR) t libtu.a | grep quux
+ $(AR) t libtu.a | grep zardoz && exit 1; exit 0
+check-zardoz:
+ $(AR) t libtu.a | grep zardoz
+ $(AR) t libtu.a | grep quux && exit 1; exit 0
END
cat > quux.c <<'END'
@@ -52,8 +59,7 @@ $AUTOCONF
$MAKE
ls -l # For debugging.
test -f libtu.a
-ar t libtu.a | $FGREP quux
-ar t libtu.a | $FGREP zardoz && Exit 1
+$MAKE check-quux
$MAKE distclean
@@ -61,7 +67,6 @@ $MAKE distclean
$MAKE
ls -l # For debugging.
test -f libtu.a
-ar t libtu.a | $FGREP zardoz
-ar t libtu.a | $FGREP quux && Exit 1
+$MAKE check-zardoz
:
--
1.7.9
- [PATCH] tests: do not try to use ar(1) when AR specifies something else,
Peter Rosin <=