• Home
Name Date Size #Lines LOC

..--

UnitTestRunner/04-Jul-2025-885736

CMakeLists.txtD04-Jul-20251.5 KiB4841

README.mdD04-Jul-20252 KiB7141

run_tests.shD04-Jul-20255.3 KiB15983

testAAudio.cppD04-Jul-20252.2 KiB7545

testAudioClock.cppD04-Jul-20253.6 KiB9356

testFlowgraph.cppD04-Jul-20258.9 KiB270202

testFullDuplexStream.cppD04-Jul-202510.4 KiB207167

testResampler.cppD04-Jul-20257.6 KiB226163

testReturnStop.cppD04-Jul-20255.3 KiB13488

testReturnStopDeadlock.cppD04-Jul-20254.7 KiB162110

testStreamClosedMethods.cppD04-Jul-202513.2 KiB433324

testStreamFramesProcessed.cppD04-Jul-20253.9 KiB10067

testStreamOpen.cppD04-Jul-202527.4 KiB747621

testStreamStates.cppD04-Jul-20259.9 KiB306206

testStreamStop.cppD04-Jul-20255.3 KiB13193

testStreamWaitState.cppD04-Jul-20258.5 KiB252189

testUtilities.cppD04-Jul-20251.2 KiB4114

testXRunBehaviour.cppD04-Jul-20252.3 KiB8247

README.md

1# Oboe Unit Tests
2
3This directory contains the Oboe unit tests. They are run using the bash script `run_tests.sh`.
4
5The basic operation is:
6
71. Connect an Android device or start the Android emulator
82. Open a terminal window and execute `run_tests.sh`
9
10## Prerequisites/caveats
11
121. Java JDK installed.
132. On Mac, you must agree to the XCode license. The script will prompt you.
143. You must have compiled and executed one of the Oboe examples or OboeTester. That ensures that the NDK and cmake is installed.
154. You must define `ANDROID_NDK` as an environment variable and make sure `cmake` is on your path.
16
17To test this on Mac or Linux enter:
18
19    echo $ANDROID_HOME
20    echo $ANDROID_NDK
21    cmake --version
22
23They may already be set. If so then skip to "Running the Tests" below.
24
25If not, then this may work on Mac OS:
26
27    export ANDROID_HOME=$HOME/Library/Android/sdk
28
29or this may work on Linux:
30
31    export ANDROID_HOME=$HOME/Android/Sdk
32
33Tadb rooto determine the latest installed version of the NDK. Enter:
34
35    ls $ANDROID_HOME/ndk
36
37Make note of the folder name. Mine was "21.3.6528147" so I entered:
38
39    export ANDROID_NDK=$ANDROID_HOME/ndk/21.3.6528147/
40
41If you need to add `cmake` to your path then you can find it by entering:
42
43    ls $ANDROID_HOME/cmake
44
45Make note of the folder name. Mine was "3.10.2.4988404" so I entered:
46
47    export PATH=$PATH:$ANDROID_HOME/cmake/3.10.2.4988404/bin
48    cmake --version
49
50## Running the Tests
51
52To run the tests, enter:
53
54    cd tests
55    ./run_tests.sh
56
57When the tests finish, you may need to enter \<control-c\> to exit the script.
58
59If you get this error:
60
61    com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException:
62        INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.google.oboe.tests.unittestrunner
63        signatures do not match previously installed version; ignoring!
64
65then uninstall the app "UnitTestRunner" from the Android device. Or try:
66
67    adb root
68    adb remount -R
69
70See `run_tests.sh` for more documentation
71