diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-12-21 16:42:15 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-12-21 20:49:52 +1100 |
commit | e64ac797987faacd5f746d3c77c166967de8ca43 (patch) | |
tree | 1862b0ab3514d8f0dae8940b3e84778b3b3b82bc /test | |
parent | 23ca12850cc2ba92cdc77bfe6f11596f6b5d5ce6 (diff) | |
download | flac-e64ac797987faacd5f746d3c77c166967de8ca43.tar.gz |
Makefile.lite: Fix running of tests
* Generate `test/common.sh` from `test/common.sh.in`.
* Move `is_win` setting to `test_common.sh`.
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.lite | 1 | ||||
-rw-r--r-- | test/common.sh.in | 7 | ||||
-rwxr-xr-x | test/test_flac.sh | 6 | ||||
-rwxr-xr-x | test/test_grabbag.sh | 6 |
4 files changed, 8 insertions, 12 deletions
diff --git a/test/Makefile.lite b/test/Makefile.lite index fb6ec3ef..0bec1a1c 100644 --- a/test/Makefile.lite +++ b/test/Makefile.lite @@ -27,6 +27,7 @@ DEFAULT_CONFIG = release CONFIG = $(DEFAULT_CONFIG) all: clean + sed 's|@top_srcdir@|$(topdir)|;s|@EXEEXT@| |' common.sh.in > common.sh $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_libFLAC.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_libFLAC++.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_grabbag.sh $(CONFIG) diff --git a/test/common.sh.in b/test/common.sh.in index b3f04607..5f98cf22 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -50,6 +50,13 @@ EXE=@EXEEXT@ top_srcdir=@top_srcdir@ top_builddir=@top_builddir@ +# Set `is_win` variable which is used in other scripts that source this one. +if test $(env | grep -ic '^comspec=') != 0 ; then + is_win=yes +else + is_win=no +fi + # change to 'false' to show all flac/metaflac output (useful for debugging) if true ; then SILENT='--silent' diff --git a/test/test_flac.sh b/test/test_flac.sh index c07e1472..5578d9d8 100755 --- a/test/test_flac.sh +++ b/test/test_flac.sh @@ -58,12 +58,6 @@ md5cmp () [ "$n" != "" ] && [ $n = 1 ] } -if [ `env | grep -ic '^comspec='` != 0 ] ; then - is_win=yes -else - is_win=no -fi - echo "Checking for --ogg support in flac..." if flac${EXE} --ogg $TOTTALY_SILENT --force-raw-format --endian=little --sign=signed --channels=1 --bps=8 --sample-rate=44100 -c $0 1>/dev/null 2>&1 ; then has_ogg=yes; diff --git a/test/test_grabbag.sh b/test/test_grabbag.sh index 6c7e320b..c40c0d3d 100755 --- a/test/test_grabbag.sh +++ b/test/test_grabbag.sh @@ -47,12 +47,6 @@ run_test_picture () fi } -if [ `env | grep -ic '^comspec='` != 0 ] ; then - is_win=yes -else - is_win=no -fi - ######################################################################## # # test_picture |