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

Skip to content
Commit 03e9c7c4 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Preparing to switch away from the deprecated test runner

A lot of ravenwood tests (and other tests too) use the deprecated
test runner androidx.test.runner.AndroidJUnit4, but it actually has
problems. We should switch them to
androidx.test.ext.junit.runners.AndroidJUnit4.

However, simply updating all tests could be problematic because:
- we need to update the build rules and add "androidx.test.ext.junit"
as a static dependency, which is probably safe but it could
cause class conflicts.(?)
- More importantly, the subtle difference between the test runner
could make the device side test fail.

So I'm going to do it in two steps:

- Step 1 -- this CL:
Add an optional validator to RavenwoodTest, which can be enabled
with RAVENWOOD_OPTIONAL_VALIDATION=1.

This makes a test fail if it's using the deprecated one.

- Added a test for this

- Added a script to replace the test runner.

Test: run-ravenwood-tests
Test: RAVENWOOD_OPTIONAL_VALIDATION=1 atest RavenwoodCoreTest
Bug: 317131861

Change-Id: I5762bd097c3a529ae6e14460d9e326ed5c6086b4
parent bdf038d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment