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

Respect ANDROID_AVD_HOME environment variable #1778

Merged
merged 6 commits into from Jan 3, 2020
Merged

Respect ANDROID_AVD_HOME environment variable #1778

merged 6 commits into from Jan 3, 2020

Conversation

lvanengelen
Copy link
Contributor

  • This is a small change

Description:

Android SDK tools respect the ANDROID_AVD_HOME environment variable to locate installed emulator instances. This change adds support for that setting when fixing up the config.ini file.

@noomorph
Copy link
Collaborator

Could you check this? #1573 (comment)

@noomorph noomorph self-assigned this Nov 26, 2019
@lvanengelen
Copy link
Contributor Author

lvanengelen commented Nov 27, 2019

Looked at #1573 and I investigated a bit. I ran emulator -list-avds in different configurations and got the following to list the avds correctly:

  • With avds inside /tmp/foo/.android/avd: ANDROID_SDK_HOME=/tmp/foo emulator -list-avds
  • With avds inside /home/len/android/avd: ANDROID_EMULATOR_HOME=/home/len/android emulator -list-avds
  • With avds inside /home/len/android/avd: ANDROID_AVD_HOME=/home/len/android/avd emulator -list-avds

This corresponds with the emulator source code.

I will update the branch to reflect this.

Reading #1573 I am not sure why ANDROID_SDK_HOME did not work.

These are:

- `ANDROID_SDK_HOME`
- `ADNROID_EMULATOR_HOME`
- `ANDROID_AVD_HOME`

See
[the Android SDK docs](https://developer.android.com/studio/command-line/variables#android-sdk-home)
for details.
@lvanengelen
Copy link
Contributor Author

Hmm, I have a hard time deciphering the Jenkins logs to figure out what went wrong during the checks of the second commit. I also fail to understand why it would break while the first commit succeeded. Any pointers are welcome.

Copy link
Collaborator

@noomorph noomorph left a comment

Choose a reason for hiding this comment

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

Why not use path.join to be consistent for Windows?

@lvanengelen
Copy link
Contributor Author

Because the original code also contained /, but I can fix that. Also gives me a way of retriggering the checks :) Or is there some easier way than pushing a new commit?

@noomorph
Copy link
Collaborator

If nobody looks earlier, I can look on Monday.

@lvanengelen
Copy link
Contributor Author

lvanengelen commented Dec 12, 2019

That would be nice. As an experiment I force-pushed my initial commit (which completed fine earlier) and the checks also failed, so something seems to have changed in the test setup after my initial commit?

For now I re-pushed my other commits for completeness.

@noomorph noomorph merged commit e560bac into wix:master Jan 3, 2020
@noomorph
Copy link
Collaborator

noomorph commented Jan 3, 2020

@lvanengelen, thank you for your contribution!

@lvanengelen
Copy link
Contributor Author

lvanengelen commented Jan 3, 2020

Thanks for helping out! Just out of curiosity, could you explain why CI kept failing after my earlier pushes?

@lvanengelen lvanengelen deleted the android-avd-home branch January 3, 2020 13:27
@noomorph
Copy link
Collaborator

noomorph commented Jan 3, 2020

I am not sure about everything, but, in particular, the Jenkins OSS CI had undergone some configuration changes and only the recent commits to master have fixed android-rn-59 problems and maybe something else. I have noticed that your branch has been not in sync with master for enough time to start getting some of those issues.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants