Merge "libeffects: Added support to test effects using 32 and 64 bit binaries" into qt-dev am: 7ec75ad4ad

am: 8c9812a241

Change-Id: If330af12964754f195968ce1f42716f4d6cd703b
gugelfrei
Andy Hung 5 years ago committed by android-build-merger
commit fd854051fe

@ -24,9 +24,32 @@ echo "========================================"
echo "testing lvm"
adb shell mkdir -p $testdir
adb push $ANDROID_BUILD_TOP/cts/tests/tests/media/res/raw/sinesweepraw.raw $testdir
adb push $OUT/testcases/lvmtest/arm64/lvmtest $testdir
adb push $OUT/testcases/snr/arm64/snr $testdir
E_VAL=1
if [ -z "$1" ]
then
cmds=("adb push $OUT/testcases/lvmtest/arm64/lvmtest $testdir"
"adb push $OUT/testcases/lvmtest/arm/lvmtest $testdir"
)
elif [ "$1" == "32" ]
then
cmds="adb push $OUT/testcases/lvmtest/arm/lvmtest $testdir"
elif [ "$1" == "64" ]
then
cmds="adb push $OUT/testcases/lvmtest/arm64/lvmtest $testdir"
else
echo ""
echo "Invalid \"val\""
echo "Usage:"
echo " "$0" [val]"
echo " where, val can be either 32 or 64."
echo ""
echo " If val is not specified then both 32 bit and 64 bit binaries"
echo " are tested."
exit $E_VAL
fi
flags_arr=(
"-csE"
"-eqE"
@ -61,42 +84,45 @@ fs_arr=(
# run multichannel effects at different configs, saving only the stereo channel
# pair.
error_count=0
for flags in "${flags_arr[@]}"
for cmd in "${cmds[@]}"
do
for fs in ${fs_arr[*]}
$cmd
for flags in "${flags_arr[@]}"
do
for chMask in {0..22}
for fs in ${fs_arr[*]}
do
adb shell $testdir/lvmtest -i:$testdir/sinesweepraw.raw \
-o:$testdir/sinesweep_$((chMask))_$((fs)).raw -chMask:$chMask -fs:$fs $flags
shell_ret=$?
if [ $shell_ret -ne 0 ]; then
echo "error: $shell_ret"
((++error_count))
fi
# two channel files should be identical to higher channel
# computation (first 2 channels).
# Do not compare cases where -bE is in flags (due to mono computation)
if [[ $flags != *"-bE"* ]] && [[ "$chMask" -gt 1 ]]
then
adb shell cmp $testdir/sinesweep_1_$((fs)).raw \
$testdir/sinesweep_$((chMask))_$((fs)).raw
elif [[ $flags == *"-bE"* ]] && [[ "$chMask" -gt 1 ]]
then
adb shell $testdir/snr $testdir/sinesweep_1_$((fs)).raw \
$testdir/sinesweep_$((chMask))_$((fs)).raw -thr:90.308998
fi
# both cmp and snr return EXIT_FAILURE on mismatch.
shell_ret=$?
if [ $shell_ret -ne 0 ]; then
echo "error: $shell_ret"
((++error_count))
fi
for chMask in {0..22}
do
adb shell $testdir/lvmtest -i:$testdir/sinesweepraw.raw \
-o:$testdir/sinesweep_$((chMask))_$((fs)).raw -chMask:$chMask -fs:$fs $flags
shell_ret=$?
if [ $shell_ret -ne 0 ]; then
echo "error: $shell_ret"
((++error_count))
fi
# two channel files should be identical to higher channel
# computation (first 2 channels).
# Do not compare cases where -bE is in flags (due to mono computation)
if [[ $flags != *"-bE"* ]] && [[ "$chMask" -gt 1 ]]
then
adb shell cmp $testdir/sinesweep_1_$((fs)).raw \
$testdir/sinesweep_$((chMask))_$((fs)).raw
elif [[ $flags == *"-bE"* ]] && [[ "$chMask" -gt 1 ]]
then
adb shell $testdir/snr $testdir/sinesweep_1_$((fs)).raw \
$testdir/sinesweep_$((chMask))_$((fs)).raw -thr:90.308998
fi
# both cmp and snr return EXIT_FAILURE on mismatch.
shell_ret=$?
if [ $shell_ret -ne 0 ]; then
echo "error: $shell_ret"
((++error_count))
fi
done
done
done
done

Loading…
Cancel
Save