xref: /aosp_15_r20/external/libopus/tests/opus_build_test.sh (revision a58d3d2adb790c104798cd88c8a3aff4fa8b82cc)
1#!/bin/sh
2
3tarball=`realpath "$1"`
4nb_tests="$2"
5oldvectors=`realpath "$3"`
6newvectors=`realpath "$4"`
7base=`basename "$tarball" .tar.gz`
8
9tar xvf "$tarball" > /dev/null 2>&1
10cd "$base"
11
12if [ $? -ne 0 ]
13then
14        echo cannot go to "$base"
15        exit 1
16fi
17
18mkdir build_tests
19
20configure_dir=`pwd`
21seq -w "$nb_tests" | parallel --halt now,fail=10 -j +2 -q ../random_config.sh "build_tests/run_{}" "$configure_dir" "$oldvectors" "$newvectors"
22
23if [ $? -ne 0 ]
24then
25        echo Check found errors
26        exit 1
27else
28        echo No error found
29fi
30