-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Description
I'm currently having to exclude the camera and camera_android tests from the new emulator CI tests I'm bringing up, because when they run a system dialog pops up asking for camera permissions. When running locally, if I tap it in the emulator everything runs fine.
It looks like this is probably a regression from flutter/packages#4348, because we have code in test_driver/integration_test.dart in the camera packages that is clearly supposed to handle this, by running adb commands once the process starts. Some options I can think of, although there may well be others:
- Teach the repo tooling to use
flutter drivefor specific packages that opt out offlutter test. This will regress us in a way though, sinceflutter drivelogs warnings that we should be usingflutter test, and it's not clear to me ifdrivewill even continue to be supported for non-web. - Find an alternate solution to grant permissions. E.g., can we grant them before the app is even installed, perhaps as part of emulator creation, or a new pre-test-run-script option in the repo tooling? I don't know what
adballows in that regard. - Add functionality to
flutter testto allow for this in some way if possible (e.g., by allowing a custom driver even though one isn't normally used).
I'll be disabling this test in the emulator CI bringup for now to avoid blocking the rest of that work, via a new script/configs/exclude_integration_android_emulator.yaml file. When this is fixed, the exclusion should be remove from that file.
/cc @bparrishMines since he's been looking at the way integration tests run, the drive vs test differences, etc.