Repository navigation
[ai] apps: Test split APK backup through CopyService - #4746
Open
carrerasdarren-cell wants to merge 1 commit into
Open
carrerasdarren-cell wants to merge 1 commit into
carrerasdarren-cell wants to merge 1 commit into
Conversation
Cover the app backup action from its actual menu through the copy service, checking split APK names and byte-for-byte output as well as monolithic application controls. Keep production behavior unchanged and use synthetic local data. Codex assisted this contribution. Fixes TeamAmaze#2359.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes: #2359
Description
Add headless coverage for the app manager's Backup action, from the real bound adapter menu through its unchanged Intent to CopyService. The tests verify that the base APK and every split reach
app_backupunder the expected names with their original bytes intact, and that backup preserves the sources. Production code is unchanged.The split case covers ABI, locale and uppercase-extension/density names with distinct binary contents. Null and empty split lists provide the single-APK controls. Every case checks the actual service component, target and UNKNOWN-mode Intent, the completion broadcast, absence of failed-operation broadcasts, and the exact output filenames and bytes.
Automatic tests
./gradlew :app:testFdroidDebugUnitTest --tests com.amaze.filemanager.adapters.AppsRecyclerAdapterBackupTest— 9 passed, zero failures/errors/skips across the inherited configured SDK variants (21/28/30).The final test source was rerun after a helper-only readability extraction. Test inputs, assertions and production behavior remained unchanged. These are actual project/Robolectric runs with synthetic local files; the external Gradle init script limits execution to one worker/test fork and redirects reports and temporary files to the SSD without removing owner tasks or dependencies.
Manual tests
The APK-named binary fixtures exercise the copy workflow; they are not installed or executed. The sample ZIP linked in the issue was blocked by Chrome, so this does not claim reproduction with that exact archive.
Build tasks success
./gradlew assembleDebug— F-Droid and Play debug builds passed../gradlew spotlessCheck— passed again on the final test file.Assembly passed before the helper-only test extraction; app sources and build inputs are byte-identical afterward. Existing upstream resource/deprecation warnings remain. No full test-suite or physical-device claim is made.
Generative code
Codex assisted implementation, actual test execution and review. Independent AI review is not represented as human validation.