Repository navigation
[pigeon] Reorganize test pigeons #115168
Description
The Pigeon API definitions used for tests are defined in a bunch of files in the pigeons/ directory. There are several problems with this:
- They grew haphapzardly:
- It's not always clear what any given file is intended to test (e.g., the original file is just called "message.dart" rather than having a usage-based name, and there are ambiguous cases like "enum.dart" vs "enum_args.dart")
- Some have multiple APIs, some only one.
- It's not clear when to make a new file vs. editing an existing one.
- Each file is generated in its own
pigeoninvocation in the test script, and each invocation is slow. It takes quite a while, especially on Windows, to generate all of the output, because there are so many files, and each new file slows things down more.
We should consolidate this to a small number of files—very possibly that number being one—and clearly group things (with comments) within that file. E.g., Maybe we have one API that tests all permutations of arguments, or one that tests all permutations of enums (return value, direct arg, class field), even though they are in the same file. But we definitely don't need to have a lot of single-entry APIs like we currently have across the files.
Currently the native unit test files are mostly broken down matching the pigeons/ files; we would need to figure out how we want to groups those files instead. But we can certainly have multiple source files for the native unit tests even if we consolidate the API definition, if keeping file division is useful.
(This has been discussed in the past, but I didn't see an issue where we captured it. /cc @tarrinneal )
Activity
stuartmorgan-g commentedon Nov 18, 2022
We also have special logic to rename some of the files when generating Java output, since the Java generator puts everything in a top-level class with the same name as the file (due to Java naming requirements), and in cases like the file called
list.dartthat ends up being problematic. We should remove the need for special mapping when we overhaul the file structure.[pigeon] Initial integration test setup
[pigeon] Initial integration test setup (#2851)
flutter-triage-bot commentedon Jul 9, 2023
This issue is assigned but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
flutter-triage-bot commentedon Jul 31, 2023
This issue was assigned to @tarrinneal but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
stuartmorgan-g commentedon Aug 7, 2023
Unassigning since I've landed the parts I was working on (remaining test harness consolidation); the pigeon files themselves still need to be consolidated.
[pigeon] Initial integration test setup (flutter#2851)
[pigeon] Initial integration test setup (flutter#2851)