1*f81fb7c4SAndroid Build Coastguard Worker## Media Testing ## 2*f81fb7c4SAndroid Build Coastguard Worker--- 3*f81fb7c4SAndroid Build Coastguard Worker#### Sonivox Unit Test 4*f81fb7c4SAndroid Build Coastguard WorkerThe Sonivox Unit Test Suite validates the Sonivox library available in external/sonivox/ 5*f81fb7c4SAndroid Build Coastguard Worker 6*f81fb7c4SAndroid Build Coastguard WorkerRun the following steps to build the test suite: 7*f81fb7c4SAndroid Build Coastguard Worker``` 8*f81fb7c4SAndroid Build Coastguard Workerm SonivoxTest 9*f81fb7c4SAndroid Build Coastguard Worker``` 10*f81fb7c4SAndroid Build Coastguard Worker 11*f81fb7c4SAndroid Build Coastguard WorkerThe 32-bit binaries will be created in the following path : ${OUT}/data/nativetest/ 12*f81fb7c4SAndroid Build Coastguard Worker 13*f81fb7c4SAndroid Build Coastguard WorkerThe 64-bit binaries will be created in the following path : ${OUT}/data/nativetest64/ 14*f81fb7c4SAndroid Build Coastguard Worker 15*f81fb7c4SAndroid Build Coastguard WorkerTo test 64-bit binary push binaries from nativetest64. 16*f81fb7c4SAndroid Build Coastguard Worker``` 17*f81fb7c4SAndroid Build Coastguard Workeradb push ${OUT}/data/nativetest64/SonivoxTest/SonivoxTest /data/local/tmp/ 18*f81fb7c4SAndroid Build Coastguard Worker``` 19*f81fb7c4SAndroid Build Coastguard Worker 20*f81fb7c4SAndroid Build Coastguard WorkerTo test 32-bit binary push binaries from nativetest. 21*f81fb7c4SAndroid Build Coastguard Worker``` 22*f81fb7c4SAndroid Build Coastguard Workeradb push ${OUT}/data/nativetest/SonivoxTest/SonivoxTest /data/local/tmp/ 23*f81fb7c4SAndroid Build Coastguard Worker``` 24*f81fb7c4SAndroid Build Coastguard Worker 25*f81fb7c4SAndroid Build Coastguard WorkerThe resource file for the tests is taken from [here](https://dl.google.com/android-unittest/media/external/sonivox/test/SonivoxTestRes-1.0.zip). Download, unzip and push these files into device for testing. 26*f81fb7c4SAndroid Build Coastguard Worker 27*f81fb7c4SAndroid Build Coastguard Worker``` 28*f81fb7c4SAndroid Build Coastguard Workeradb push SonivoxTestRes-1.0 /sdcard/test/ 29*f81fb7c4SAndroid Build Coastguard Worker``` 30*f81fb7c4SAndroid Build Coastguard Worker 31*f81fb7c4SAndroid Build Coastguard Workerusage: SonivoxTest -P \<path_to_res_folder\> -C <remove_output_file> 32*f81fb7c4SAndroid Build Coastguard Worker``` 33*f81fb7c4SAndroid Build Coastguard Workeradb shell /data/local/tmp/SonivoxTest -P /sdcard/test/SonivoxTestRes-1.0/ -C true 34*f81fb7c4SAndroid Build Coastguard Worker``` 35*f81fb7c4SAndroid Build Coastguard WorkerAlternatively, the test can also be run using atest command. 36*f81fb7c4SAndroid Build Coastguard Worker 37*f81fb7c4SAndroid Build Coastguard Worker``` 38*f81fb7c4SAndroid Build Coastguard Workeratest SonivoxTest -- --enable-module-dynamic-download=true 39*f81fb7c4SAndroid Build Coastguard Worker``` 40