Skip to content

[android] Allow skipping adb_clean.py #24551

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

Conversation

drodriguez
Copy link
Contributor

@drodriguez drodriguez commented May 7, 2019

In normal cases, adb_clean.py cleaning the temporary 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 #24146, only the modified
artifacts will be uploaded, and the test iteration can be very fast
(including no time, if there are no changes).

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).
@drodriguez drodriguez requested a review from compnerd May 7, 2019 01:08
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.

Minor nit, it is "temporary directory", not "temporal directory".

@drodriguez
Copy link
Contributor Author

@swift-ci please smoke test

@drodriguez drodriguez merged commit f70c41b into swiftlang:master May 8, 2019
@drodriguez drodriguez deleted the android-allow-skipping-clean branch July 16, 2019 23:40
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