[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-cppi] [PATCH] tests: accommodate systems with non-empty $(EXEEXT) l
From: |
Jim Meyering |
Subject: |
[bug-cppi] [PATCH] tests: accommodate systems with non-empty $(EXEEXT) like cygwin |
Date: |
Wed, 25 Jan 2012 09:47:21 +0100 |
The nixos/hydra autobuilder reported a cygwin test failure
due to a bug in the help-version test.
http://hydra.nixos.org/build/1935199
+ eval 'expected=$expected_failure_status_cppi.exe'
++ expected=.exe
+ test x.exe = x
+ test 1 = .exe
+ fail=1
+ echo '*** cppi.exe: bad exit status '\''1'\'' (expected .exe),'
*** cppi.exe: bad exit status '1' (expected .exe),
This should address it:
>From dec03cf7defe6bd111303fd31fec975ca1f0aa82 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 25 Jan 2012 09:45:28 +0100
Subject: [PATCH] tests: accommodate systems with non-empty $(EXEEXT) like
cygwin
* tests/help-version: Remove any .exe suffix from $prog before
eval'ing to get $prog_setup or expected_failure_status_$prog values.
* tests/local.mk (TESTS_ENVIRONMENT): Export $(EXEEXT).
---
tests/help-version | 4 ++--
tests/local.mk | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/help-version b/tests/help-version
index 5be8a0a..1108c02 100755
--- a/tests/help-version
+++ b/tests/help-version
@@ -100,7 +100,7 @@ for lang in C fr da; do
env $i --help >/dev/full 2>/dev/null && fail=1
env $i --version >/dev/full 2>/dev/null && fail=1
status=$?
- test $i = [ && prog=lbracket || prog=$i
+ test $i = [ && prog=lbracket || prog=$(echo $i|sed 's/$EXEEXT$//')
eval "expected=\$expected_failure_status_$prog"
test x$expected = x && expected=1
if test $status = $expected; then
@@ -265,7 +265,7 @@ for i in $built_programs; do
cp $tmp_in $tmp_in2
mkdir $tmp_dir
# echo ================== $i
- test $i = [ && prog=lbracket || prog=$i
+ test $i = [ && prog=lbracket || prog=$(echo $i|sed 's/$EXEEXT$//')
if type ${prog}_setup > /dev/null 2>&1; then
${prog}_setup
else
diff --git a/tests/local.mk b/tests/local.mk
index 1674b9c..e227e7b 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -48,6 +48,7 @@ TESTS_ENVIRONMENT = \
export \
srcdir=$(srcdir) \
top_srcdir=$(top_srcdir) \
+ EXEEXT=$(EXEEXT) \
built_programs="`basename $(bin_PROGRAMS)`" \
VERSION='$(VERSION)' \
PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)' \
--
1.7.9.rc2.2.g183d6
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-cppi] [PATCH] tests: accommodate systems with non-empty $(EXEEXT) like cygwin,
Jim Meyering <=