Do not stop reproducible comparison at the first mismatch #14570
+33
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First time contributor checklist
Contributor checklist
Fixes #1234syntaxDescription
Short
This improves the reproducible script so that it shows all mismatches, not only the first one.
Long
The modifications are located in the three main functions of apkdiff.py
Instead of comparing entry names and antry contents using a single logical AND, both comparisons are now always executed and their results returned. This allows mismatches from both comparisons to be displayed.
Instead of returning on the first name mismatch, the function now checks which entry names are (or are not) present in both APKs, displays them, and then returns False. This makes it easier to see all entry name mismatches.
The function no longer returns immediately when entry lengths mismatch. It continues checking the contents of all entries and returns False afterward.