Also fix some test cases. I'd prefer using Robolectric shadows rather than mocking Android framework classes. However, I can't do that in this CL due to the lack of multiple shadow classes support. Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER=com.android.settings.display.darkmode.* Bug: 215182463 Change-Id: If557d2933927a5dd0fadd3f6db6bb6f0ab7dd5ee
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.