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
Loading
Please register or sign in to comment