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

Commit 55cb426b authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Support test / target context, app context

- Instrumentation.getContext() and getTargetContext() now returns
different context objects to simulate the real behavior.

- Now RavenwoodConfig allows to set "target app package name".

- Make sure the resources apk is connected to the correct context.

- Unsupported behavior:
On the real device, tests can access resouces of both the target APK
and the test APK, but Ravenwood currently only supports resouces from
the target APK. But this resources is available on the test context as
well, if the test package name and the target package name are the same.
(which is the default behavior)

- Also made some internal clean up -- now RavenwoodRunnerState is
just a member of RavenwoodAwareTestRunner. We put a stub class
in junit-stub-src.

Flag: EXEMPT host test change only
Bug: 292141694
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh

Change-Id: I3bffb04b227730f21c757f356ae0820cc85963ab
parent 686b26fe
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