aboutsummaryrefslogtreecommitdiffstats
path: root/test/run-test.sh
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-01-05 17:50:19 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-01-05 17:50:19 +0100
commit571316f329948dc464cc2be37b210f0b3e7816f7 (patch)
tree8396262af9d84f5a0490af9805cde11cf5fc9eed /test/run-test.sh
parente778887e4e5589528b06b04404ce4c71aaae267a (diff)
parent716f4394641d53f0d79c9ddac3fa93b03a49f278 (diff)
downloadfdk-aac-571316f329948dc464cc2be37b210f0b3e7816f7.tar.gz
fdk-aac-571316f329948dc464cc2be37b210f0b3e7816f7.tar.bz2
fdk-aac-571316f329948dc464cc2be37b210f0b3e7816f7.zip
Merge fdk-aac 'v2.0.3' into dabplus2dabplus2
Diffstat (limited to 'test/run-test.sh')
-rwxr-xr-xtest/run-test.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/run-test.sh b/test/run-test.sh
new file mode 100755
index 0000000..b2ef548
--- /dev/null
+++ b/test/run-test.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+set -e
+set -o pipefail
+
+if [ ! -f Sample01_4.wav ]; then
+ curl -LO https://media.xiph.org/audio/HA_2011/Sample01_4.wav
+fi
+
+if [ "$(md5sum Sample01_4.wav | awk '{print $1}')" != "a5c105544c64ce92c6c5c06d280e6b9c" ]; then
+ echo Incorrect checksum for Sample01_4.wav
+ exit 1
+fi
+
+if [ ! -f Sample01_4-mono.wav ]; then
+ ffmpeg -i Sample01_4.wav -ac 1 -fflags +bitexact -y Sample01_4-mono.wav
+fi
+
+if [ "$(md5sum Sample01_4-mono.wav | awk '{print $1}')" != "3bfccac9f2e527ba3ef888874f09a409" ]; then
+ echo Incorrect checksum for Sample01_4-mono.wav
+ exit 1
+fi
+
+./test-encode-decode Sample01_4.wav | tee log-stereo.txt
+./test-encode-decode Sample01_4-mono.wav | tee log-mono.txt
+
+diff -u log-stereo.txt $(dirname $0)/ref-stereo.txt
+diff -u log-mono.txt $(dirname $0)/ref-mono.txt