aosp12/external/oboe/tests
hcl 7be3fd486c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
..
UnitTestRunner init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
CMakeLists.txt init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
README init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
README.md init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
run_tests.sh init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
testAAudio.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
testFlowgraph.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
testStreamClosedMethods.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
testStreamOpen.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
testStreamStates.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
testStreamWaitState.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
testUtilities.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
testXRunBehaviour.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00

README.md

Oboe Unit Tests

This directory contains the Oboe unit tests. They are run using the bash script run_tests.sh.

The basic operation is:

  1. Connect an Android device or start the Android emulator
  2. Open a terminal window and execute run_tests.sh

Prerequisites/caveats

You must have compiled and executed one of the Oboe examples or OboeTester. That ensures that the NDK and cmake is installed.

You must define ANDROID_NDK as an environment variable and make sure cmake is on your path.

To test this on Mac or Linux enter:

echo $ANDROID_HOME
echo $ANDROID_NDK
cmake --version

They may already be set. If not, then this may work on Mac OS:

export ANDROID_HOME=$HOME/Library/Android/sdk

or this may work on Linux:

export ANDROID_HOME=$HOME/Android/Sdk

Now we need to determine the latest installed version of the NDK. Enter:

ls $ANDROID_HOME/ndk

Make note of the folder name. Mine was "21.3.6528147" so I entered:

export ANDROID_NDK=$ANDROID_HOME/ndk/21.3.6528147/

If you need to add cmake to your path then you can find it by entering:

ls $ANDROID_HOME/cmake

Make note of the folder name. Mine was "3.10.2.4988404" so I entered:

export PATH=$PATH:$ANDROID_HOME/cmake/3.10.2.4988404/bin
cmake --version

Running the Tests

To run the tests, enter:

cd tests
./run_tests.sh

You may need to enter <control-c> to exit the script.

If you get this error:

com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException:
    INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.google.oboe.tests.unittestrunner
    signatures do not match previously installed version; ignoring!

then uninstall the app "UnitTestRunner" from the Android device.

See run_tests.sh for more documentation