aboutsummaryrefslogtreecommitdiff
path: root/tests/opus_build_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/opus_build_test.sh')
-rwxr-xr-xtests/opus_build_test.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/opus_build_test.sh b/tests/opus_build_test.sh
new file mode 100755
index 00000000..573f4473
--- /dev/null
+++ b/tests/opus_build_test.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+tarball=`realpath "$1"`
+nb_tests="$2"
+oldvectors=`realpath "$3"`
+newvectors=`realpath "$4"`
+base=`basename "$tarball" .tar.gz`
+
+tar xvf "$tarball" > /dev/null 2>&1
+cd "$base"
+
+if [ $? -ne 0 ]
+then
+ echo cannot go to "$base"
+ exit 1
+fi
+
+mkdir build_tests
+
+configure_dir=`pwd`
+seq -w "$nb_tests" | parallel --halt now,fail=10 -j +2 -q ../random_config.sh "build_tests/run_{}" "$configure_dir" "$oldvectors" "$newvectors"
+
+if [ $? -ne 0 ]
+then
+ echo Check found errors
+ exit 1
+else
+ echo No error found
+fi