OSDN Git Service

46f1cd64d84e9a77756059e56c3d973786e0ba8f
[android-x86/system-media.git] / audio_utils / tests / build_and_run_all_unit_tests.sh
1 #!/bin/bash
2 #
3 # Run tests in this directory.
4 #
5
6 if [ -z "$ANDROID_BUILD_TOP" ]; then
7     echo "Android build environment not set"
8     exit -1
9 fi
10
11 # ensure we have mm
12 . $ANDROID_BUILD_TOP/build/envsetup.sh
13
14 mm
15
16 echo "waiting for device"
17
18 adb root && adb wait-for-device remount
19
20 echo "========================================"
21 echo "testing primitives"
22 adb push $OUT/system/lib/libaudioutils.so /system/lib
23 adb push $OUT/data/nativetest/primitives_tests/primitives_tests /system/bin
24 adb shell /system/bin/primitives_tests
25
26 echo "testing power"
27 adb push $OUT/data/nativetest/power_tests/power_tests /system/bin
28 adb shell /system/bin/power_tests
29
30 echo "testing channels"
31 adb push $OUT/data/nativetest/channels_tests/channels_tests /system/bin
32 adb shell /system/bin/channels_tests
33
34 echo "benchmarking primitives"
35 adb push $OUT/system/bin/primitives_benchmark /system/bin
36 adb shell /system/bin/primitives_benchmark