Commit 1a7c3fa4 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

tests/*.sh : Switch back to /bin/sh.



Jan Stary reported that on OpenBSD bash isn't located in /bin/
which means that the test fail. He also noted that there didn't
seem to be anything bash specific in the tests.

This patch takes some suggestions from Jan, plus a few fixes tested
on Debian using the bin/sh provided by bash and dash.
Suggested-by: Jan Stary's avatarJan Stary <hans@stare.cz>
parent fe494d2d
......@@ -56,12 +56,14 @@ fi
# Functions
function die {
die ()
{
echo $* 1>&2
exit 1
}
function make_streams {
make_streams ()
{
echo "Generating streams..."
if [ ! -f wacky1.wav ] ; then
test_streams${EXE} || die "ERROR during test_streams"
......
#!/bin/bash -e
#!/bin/sh -e
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2001-2009 Josh Coalson
......@@ -18,7 +18,7 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
source common.sh
. ./common.sh
PATH=../src/flac:$PATH
PATH=../objs/$BUILD/bin:$PATH
......
#!/bin/bash -e
#!/bin/sh -e
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2012-2014 Xiph.Org Foundation
......@@ -17,7 +17,7 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
source common.sh
. ./common.sh
PATH=`pwd`/../src/flac:$PATH
......@@ -39,9 +39,8 @@ for k in 0 1 2 3 4 5 6 7 8 ; do
echo "Error : Compression ${last_k} size ${last_size} >= compression ${k} size ${size}."
exit 1
fi
# Need this string interpolation because OSX's 'wc -c' returns a number with
# leading whitespace.
let last_size="${size}+10"
# Need this because OSX's 'wc -c' returns a number with leading whitespace.
last_size=$((${size}+10))
last_k=${k}
rm -f ${fname}
done
#!/bin/bash -e
#!/bin/sh -e
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2001-2009 Josh Coalson
......@@ -18,7 +18,7 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
source common.sh
. ./common.sh
# we use '.' as decimal separator in --skip/--until tests
export LANG=C LC_ALL=C
......
#!/bin/bash -e
#!/bin/sh -e
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2001-2009 Josh Coalson
......@@ -18,7 +18,7 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
source common.sh
. ./common.sh
PATH=../src/test_grabbag/cuesheet:$PATH
PATH=../src/test_grabbag/picture:$PATH
......
#!/bin/bash -e
#!/bin/sh -e
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2002-2009 Josh Coalson
......@@ -18,7 +18,7 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
source common.sh
. ./common.sh
PATH=../src/test_libFLAC++:$PATH
PATH=../objs/$BUILD/bin:$PATH
......
#!/bin/bash -e
#!/bin/sh -e
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2001-2009 Josh Coalson
......@@ -18,7 +18,7 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
source common.sh
. ./common.sh
PATH=../src/test_libFLAC:$PATH
PATH=../objs/$BUILD/bin:$PATH
......
#!/bin/bash -e
#!/bin/sh -e
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2002-2009 Josh Coalson
......@@ -18,7 +18,7 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
source common.sh
. ./common.sh
PATH=`pwd`/../src/flac:$PATH
PATH=`pwd`/../src/metaflac:$PATH
......
#!/bin/bash -e
#!/bin/sh -e
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2002-2009 Josh Coalson
......@@ -18,7 +18,7 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
source common.sh
. ./common.sh
PATH=`pwd`/../src/flac:$PATH
PATH=`pwd`/../src/metaflac:$PATH
......
#!/bin/bash -e
#!/bin/sh -e
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2004-2009 Josh Coalson
......@@ -18,7 +18,7 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
source common.sh
. ./common.sh
PATH=../src/flac:$PATH
PATH=../src/metaflac:$PATH
......
#!/bin/bash -e
#!/bin/sh -e
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2001-2009 Josh Coalson
......@@ -18,7 +18,7 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
source common.sh
. ./common.sh
PATH=../src/flac:$PATH
PATH=../src/test_streams:$PATH
......
#!/bin/bash -e
#!/bin/sh -e
# This test script should exit on the first failure.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment