Skip to content

[android] Make ADB push use sync if available. #24146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2019

Conversation

drodriguez
Copy link
Contributor

In recent adb versions, the push command supports a new option --sync
which performs checksumming of the files to transmit against the files
already in the device. This increases the effective transmission speed
of the inital step in the test for Android.

It should not affect the speed of each tests, since they are pushed to
different folders, and also they are removed when they are successful.
However, the test executables are small compared to the size of the
libraries from the stadard library and dependencies.

This should exclusively affect Android and only to people testing the
executable tests (not CI).

In recent adb versions, the push command supports a new option --sync
which performs checksumming of the files to transmit against the files
already in the device. This increases the effective transmission speed
of the inital step in the test for Android.

It should not affect the speed of each tests, since they are pushed to
different folders, and also they are removed when they are successful.
However, the test executables are small compared to the size of the
libraries from the stadard library and dependencies.

This should exclusively affect Android and only to people testing the
executable tests (not CI).
@drodriguez drodriguez requested a review from compnerd April 18, 2019 23:07
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@compnerd
Copy link
Member

@swift-ci please smoke test and merge

@drodriguez
Copy link
Contributor Author

@swift-ci please smoke test linux platform

1 similar comment
@drodriguez
Copy link
Contributor Author

@swift-ci please smoke test linux platform

@drodriguez drodriguez merged commit fd2cf65 into swiftlang:master May 1, 2019
@drodriguez drodriguez deleted the android-faster-adb-push branch May 1, 2019 00:42
drodriguez added a commit to drodriguez/swift that referenced this pull request May 7, 2019
In normal cases, adb_clean.py cleaning the temporal directory is a good
idea because all the tests run in a clean state, and previous executions
do not influence the current one.

However, when iterating and running only one or two tests with
utils/run-test, removing all the artifacts and uploading them to the
device can turn each iteration into waiting a couple of minutes. Since
the changes in between tests should only touch a couple of libraries (or
none at all, if the test itself is the modification), avoiding a full
clean is beneficial.

The commit modifies `adb_clean.py` to allow providing the environment
variable `SKIP_ANDROID_CLEAN`, which will simply not execute the script.

Since the introduction of swiftlang#24146, only the modified
artifacts will be uploaded, and the test iteration can be very fast
(including no time, if there are no changes).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants