Here's one in-tree test that launches a component and fails with my change:
src/tests/end_to_end/harvester/test/harvester_test.dart
It just launches system monitor harvester and asks it to run once, expecting that it prints "Success". This doesn't need to be an e2e test at all, this could be a component test.
IIRC we're not using Harvester anymore since we stopped developing FDT, so I think it's also safe to delete this test.
There is this test:
src/tests/end_to_end/encode_camera/test/encode_camera_test.dart
It should fail, but it doesn't because it's disabled. According to the comment it's flaky.
That said, looking at the change I don't see why it needs to be an sl4f test at all. It launches a sort of camera demo component (which is very non-hermetic, but I'm sure this can be fixed - probably should, seeing as the test is said to be flaky) and then verifies that the component encoded some number of camera frames in the span of 5 seconds by looking at a trace captured during the runtime (why not Inspect?).
Maybe I'm missing something but I think the team could have written a better test (hermetic, less flaky, simpler, not in Dart - which is a fine language, but foreign to the camera team I'm sure) if we had given them better guidance and clarified which tools are best to use here.
+tq-testing-everywhere Similar story here: src/tests/end_to_end/bt-a2dp/test/bt_a2dp_test.dart
Anyway, THE GOOD NEWS is that all the tests that use the sl4f facade to launch a component are in-tree, at least according to our LSC tools and to my Code Search abilities. And there's very few of them.
I think we can remove the ability to launch a component from sl4f. To de-risk the v2 migration, and to discourage the introduction of more e2e tests that could and should be component tests, I would advise that we proceed with this course of action.
What do folks think?