Skip to content
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

Delete temporary created by Selendroid Server #862

Merged
merged 1 commit into from May 4, 2015

Conversation

nadaismail
Copy link

Added a command line flag, -deleteTmpFiles, to delete temporary files that persist in the temp directory. Files were being created after Selendroid Standalone Server was started and test app was run. When server is started with flag, then files will be deleted when server is stopped.

@@ -164,8 +164,12 @@ public void addToAppsStore(File file) throws AndroidSdkException {
// using "android" as the app name, because that is the desired capability default in
// selenium for
// DesiredCapabilities.ANDROID
File androidAPK = androidDriverAPKBuilder.extractAndroidDriverAPK();
if(serverConfiguration != null && serverConfiguration.isDeleteTmpFiles()) {
androidAPK.deleteOnExit(); //Deletes temporary files if flag set
Copy link
Member

Choose a reason for hiding this comment

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

seems like something we should just have on by default? since the deleteOnExit seems pretty safe, since it'll wait for JVM to exit.

and we probably don't need a configuration flag around it then

Copy link
Member

Choose a reason for hiding this comment

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

actualy, i take that back, the config should stay... but we should default it to true and let people disable this as the exception to the rule :)

Copy link
Member

Choose a reason for hiding this comment

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

👍

@lukeis
Copy link
Member

lukeis commented Apr 29, 2015

also, can you please update your edits to the style format used in selendroid (2 spaces for tabs). And can you rebase your change? (as to not have the merge commits included?)

@@ -140,6 +140,9 @@
@Parameter(names = "-folder", description = "The folder which contains Android applications under test. This folder will monitor and add new apps to the apps store during the lifetime of the selendroid node.")
private String folder = null;

@Parameter(names = "-deleteTmpFiles", description = "Deletes temporary files created by the Selendroid Server.")
private boolean deleteTmpFiles = false;
Copy link
Member

Choose a reason for hiding this comment

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

as per my other comments, can you change this to true :)

@nadaismail
Copy link
Author

I updated my edits to the style format used in Selendroid and set -deleteTmpFiles to true by default

lukeis added a commit that referenced this pull request May 4, 2015
Delete temporary created by Selendroid Server
@lukeis lukeis merged commit 3600241 into selendroid:master May 4, 2015
@lukeis
Copy link
Member

lukeis commented May 4, 2015

whoops, @nadaismail can you please sign the cla?

http://goo.gl/pAvxEI

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.

None yet

3 participants