summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-11-12 14:12:09 +0100
committerJim Meyering <meyering@redhat.com>2011-11-12 14:12:09 +0100
commite87a26c5857eec858da46a72312a85afd7f8305c (patch)
tree11b26c0762a37a3ecb83155cab996987c3ff8f4c
parent26d0fa7837b74b4aef0084d39bd3adebb584d127 (diff)
downloadgrep-e87a26c5857eec858da46a72312a85afd7f8305c.tar.gz
tests: fix test suite execution failure on OSF/1 5.1
* tests/Makefile.am (TESTS_ENVIRONMENT): Use a shell function to ensure that we use only the portable form of the 'export' shell built-in.
-rw-r--r--tests/Makefile.am15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 13d3ca6f..b8a5a3c6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -105,7 +105,20 @@ MALLOC_PERTURB_ = 1
TESTS_ENVIRONMENT = \
tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.; \
TMPDIR=$$tmp__; export TMPDIR; \
- export \
+ \
+ export_with_values () \
+ { \
+ sed_extract_var='s/=.*//'; \
+ sed_quote_value="s/=\\(.*\\)/='\\1'/"; \
+ for arg in "$$@"; do \
+ var=`echo "$$arg" | sed -e "$$sed_extract_var"`; \
+ arg=`echo "$$arg" | sed -e "$$sed_quote_value"`; \
+ eval "$$arg"; \
+ export "$$var"; \
+ done; \
+ }; \
+ \
+ export_with_values \
VERSION='$(VERSION)' \
LOCALE_FR='$(LOCALE_FR)' \
LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)' \