Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ab33d3db authored by William Escande's avatar William Escande
Browse files

Run unit test with sources

Also, switch to mockito-target-extended.

For years, Bluetooth java test were trying to run against the on device
code. The prebuilt process and now the mainline process can lead to
failure in case the Bluetooth code is out-of-sync from the branch being
tested on.

This CL fix this. Now the test will recompile the source code and when
run, will guarantee that the code being tested is from the same branch
and release as the test of the code.

The side effect is that some test actually require the permission given
by the real bluetooth (threw instrumentation and shared user ID). I am
moving those into the instrumentation folder. It would be a next step to
rework these tests into a more flexible test.

Another next step will be to transition the unit test to bivalent
robolectric test, to allow host testing of the java test.

Another benefit of such change, is that the testing on Release will be
able to run properly the test with @EnabledFlags while keeping an
optimized Bluetooth app

Bug: 345013072
Bug: 393810023
Fix: 393810023
Fix: 191783947
Flag: TEST_ONLY
Test: atest BluetoothInstrumentationTests
Test: atest BluetoothUnitTestsNonUpdatable
Change-Id: I04b0c8bf1297edfddd200134e3e7e0c1932841f5
parent fc6bd60b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment