[flac-dev] flac-1.3.1pre1

Jan Stary
Tue, 25 Nov 2014 22:39:35 -0000

On Nov 25 00:43:22, mle+la at mega-nerd.com wrote:
>     http://downloads.xiph.org/releases/flac/beta/
> Please test.

Running 'make fullcheck' fails for me like this:

$ pwd
/home/hans/src/flac-1.3.1pre1/test

$ make fullcheck
FLAC__TEST_LEVEL=1 FLAC__TEST_WITH_VALGRIND=no ./test_libFLAC.sh
/bin/sh: ./test_libFLAC.sh: No such file or directory
*** Error 1 in /home/hans/src/flac-1.3.1pre1/test (Makefile:702
'fullcheck')
$ ls -l ./test_libFLAC.sh
-rwxr-xr--  1 hans  hans  1275 Nov 25 04:42 ./test_libFLAC.sh

$ ./test_libFLAC.sh
ksh: ./test_libFLAC.sh: No such file or directory

I suppose this is due to the #!/bin/bash
- indeed, bash does not exist here.

Is there a reason the test scripts are calling bash?
It doesn't seem there is soemthing bash-specific
that plain old sh could not do.

Replacing '#!/bin/bash -e' with '#!/bin/sh -e'
and removing a few pieces of bash-specific syntax
apparently runs the tests just fine. (That's not to say they pass.)
I believe it also makes the test scripts more portable; diff below.


The following tests go fine:

test_libFLAC.sh
test_libFLAC++.sh
test_grabbag.sh
test_flac.sh


The metaflac test fails like this:

Generating stream...

flac 1.3.0, Copyright (C) 2000-2009, 2011-2013	Josh Coalson & Xiph.Org
Foundation
flac comes with ABSOLUTELY NO WARRANTY.	 This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for
details.

80000+0 records in
156+1 records out
80000 bytes transferred in 0.182 secs (437977 bytes/sec)
-: Verify OK, wrote 9004 bytes, ratio=0.112

test case00: --list... OK
test case01: STREAMINFO --show-* shortcuts... OK
test case02: --add-padding... OK
test case03: --set-tag=ARTIST... OK
test case04: --set-tag=ARTIST... OK
test case05: --set-tag=ARTIST... OK
test case06: --set-tag=TITLE... OK
test case07: --show-vendor-tag --show-tag=ARTIST...
ERROR: metadata does not match expected metaflac-test-files/case07-expect.meta


The replaygain test fails; reading the test script,
I don't think the problem is in trying to call mawk
(which does not exist here).

Generating stream...

flac 1.3.0, Copyright (C) 2000-2009, 2011-2013	Josh Coalson & Xiph.Org
Foundation
flac comes with ABSOLUTELY NO WARRANTY.	 This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for
details.

80000+0 records in
156+1 records out
80000 bytes transferred in 0.194 secs (412063 bytes/sec)
-: Verify OK, wrote 9004 bytes, ratio=0.112
./test_replaygain.sh: line 85: mawk: command not found
Testing FLAC replaygain 8000 (8000 x 1) ... -: ERROR: got partial sample


The following tests pass fine:

test_seeking.sh
test_streams.sh
test_compression.sh


This is all on current OpenBSD/i386.

	Jan


--- test_bins.sh	Tue Nov 25 04:42:25 2014
+++ /home/hans/src/flac-1.3.1pre1/test/test_bins.sh	Tue Nov 25 23:27:47 2014
@@ -1,4 +1,4 @@
-#!/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
--- test_compression.sh	Tue Nov 25 04:40:14 2014
+++ /home/hans/src/flac-1.3.1pre1/test/test_compression.sh	Tue Nov 25 23:19:19
2014
@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/bin/sh -e

 #  FLAC - Free Lossless Audio Codec
 #  Copyright (C) 2012  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,7 +39,7 @@ 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
-	let last_size=${size}+10
+	last_size=$((${size}+10))
 	last_k=${k}
 	rm -f ${fname}
 	done
--- test_flac.sh	Tue Nov 25 04:42:25 2014
+++ /home/hans/src/flac-1.3.1pre1/test/test_flac.sh	Tue Nov 25 23:00:35 2014
@@ -1,4 +1,4 @@
-#!/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
--- test_grabbag.sh	Tue Nov 25 04:42:25 2014
+++ /home/hans/src/flac-1.3.1pre1/test/test_grabbag.sh	Tue Nov 25 23:00:10 2014
@@ -1,4 +1,4 @@
-#!/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
--- test_libFLAC++.sh	Tue Nov 25 04:42:25 2014
+++ /home/hans/src/flac-1.3.1pre1/test/test_libFLAC++.sh	Tue Nov 25 22:59:18
2014
@@ -1,4 +1,4 @@
-#!/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
--- test_libFLAC.sh	Tue Nov 25 04:42:25 2014
+++ /home/hans/src/flac-1.3.1pre1/test/test_libFLAC.sh	Tue Nov 25 22:58:46 2014
@@ -1,4 +1,4 @@
-#!/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
--- test_metaflac.sh	Tue Nov 25 04:42:25 2014
+++ /home/hans/src/flac-1.3.1pre1/test/test_metaflac.sh	Tue Nov 25 23:02:07 2014
@@ -1,4 +1,4 @@
-#!/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
--- test_replaygain.sh	Tue Nov 25 04:42:25 2014
+++ /home/hans/src/flac-1.3.1pre1/test/test_replaygain.sh	Tue Nov 25 23:02:32
2014
@@ -1,4 +1,4 @@
-#!/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
--- test_seeking.sh	Tue Nov 25 04:42:25 2014
+++ /home/hans/src/flac-1.3.1pre1/test/test_seeking.sh	Tue Nov 25 23:02:54 2014
@@ -1,4 +1,4 @@
-#!/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
--- test_streams.sh	Tue Nov 25 04:42:25 2014
+++ /home/hans/src/flac-1.3.1pre1/test/test_streams.sh	Tue Nov 25 23:03:11 2014
@@ -1,4 +1,4 @@
-#!/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
--- test_wrapper.sh	Tue Nov 25 04:40:14 2014
+++ /home/hans/src/flac-1.3.1pre1/test/test_wrapper.sh	Tue Nov 25 23:21:26 2014
@@ -1,12 +1,12 @@
-#!/bin/bash -e
+#!/bin/sh -e

 # This test script should exit on the first failure.

-./test_libFLAC.sh
-./test_libFLAC++.sh
-./test_grabbag.sh
-./test_flac.sh
-./test_metaflac.sh
-./test_replaygain.sh
-./test_seeking.sh
-./test_streams.sh
+sh -e ./test_libFLAC.sh
+sh -e ./test_libFLAC++.sh
+sh -e ./test_grabbag.sh
+sh -e ./test_flac.sh
+sh -e ./test_metaflac.sh
+sh -e ./test_replaygain.sh
+sh -e ./test_seeking.sh
+sh -e ./test_streams.sh