]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: fix portability issues in 'repeated-options.test'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 15 May 2011 12:41:35 +0000 (14:41 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 15 May 2011 12:41:35 +0000 (14:41 +0200)
* tests/repeated-options.test: Do not assume that object files
have `.o' suffix and executables have no default suffix; instead,
use `$(OBJEXT)' and `$(EXEEXT)'.

ChangeLog
tests/repeated-options.test

index c29d8200bb716600d752e654877e73b618f523fc..6b123009c35fb441660b83c0c7b784b2853978b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix portability issues in 'repeated-options.test'
+       * tests/repeated-options.test: Do not assume that object files
+       have `.o' suffix and executables have no default suffix; instead,
+       use `$(OBJEXT)' and `$(EXEEXT)'.
+
 2010-11-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        New test on repeated automake options.
index 84901f82cb9e5326e8eac21d11c832f150f0dd82..2f946b5428e7ec0552c73bec059061c4f9baf5b2 100755 (executable)
@@ -36,14 +36,20 @@ AUTOMAKE_OPTIONS = parallel-tests subdir-objects subdir-objects
 AUTOMAKE_OPTIONS += dist-bzip2 parallel-tests
 TESTS = foo.test
 EXTRA_DIST = $(TESTS)
+TESTS_ENVIRONMENT = EXEEXT='$(EXEEXT)'
 bin_PROGRAMS = sub/foo
+.PHONY: test-build
+test-build:
+       ls -l . sub
+       test -f sub/foo.$(OBJEXT)
+       test -f sub/foo$(EXEEXT)
 END
 
 mkdir sub
 
 cat > foo.test <<'END'
 #!/bin/sh
-test -f sub/foo && test -x sub/foo
+test -f sub/foo$EXEEXT && test -x sub/foo$EXEEXT
 END
 chmod a+x foo.test
 
@@ -64,9 +70,7 @@ $AUTOCONF
 
 ./configure
 $MAKE
-ls -l . sub
-test -f sub/foo.o
-test -f sub/foo
+$MAKE test-build
 $MAKE check
 ls -l
 test -f foo.log