-
Notifications
You must be signed in to change notification settings - Fork 381
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
test: Add test emulators to Travis CI configuration #696
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Good Work : )
@gaurivn can you please try to fix the Travis build error. Else everything looks good to me. |
Thank you @atm1504 , actually in my first commit, I had included test. The build error I got was that no test.ini file exists in $HOME/.android/avd. I searched, couldn't find how to create the test.ini file, so I replaced test with the name of an emulator (whose .avd and .ini files exist in my $HOME/.android/avd) but again I am getting error in travis that that .ini file cannot be found. Please help me solve this issue, how to go about creating the test.ini file. |
@isabelcosta , can you please help me solve the travis build error, in the first commit I had written correctly with 'test' and Travis build gives error saying that test.ini file didn't exist in my $HOME/.android/avd and I checked it wasn't there. So just to confirm again, I committed a second time, with my emulator (Nexus 5 full name - exactly how it was in the .ini files at $HOME/.android/avd) and still Travis Build says the files does not exist. Can you please tell me how to create the test.ini file, I tried searching but couldn't find. |
🤔 at this moment I am not sure what the problem is, so I will call out help here @annabauza @foongminwong and on Zulip @gaurivn |
@gaurivn |
Thank you so much @isabelcosta 🙏 |
@devansh-299 , thank you, in my first commit, I had written properly with test but it came test.ini file not there in $HOME/.android/avd. So I checked there, since my Nexus 5 emulator.ini file was there so I simply changed from test to Nexus 5...... in 2nd commit. Though the .ini file existed at the same location for Nexus 5, Travis shows it cannot find the same. I will change it back to first commit and also rename my Nexus 5 .... .ini file to test.ini, that idea never occurred to me before, keeping in mind the points you said. |
@devansh-299 , please find the screenshot attached below, grateful if you could comment on it, if I've to make more changes. I added android-30 (my emulator level) too afterwards. |
.travis.yml
Outdated
@@ -6,12 +6,18 @@ android: | |||
- tools | |||
- build-tools-28.0.3 | |||
- android-28 | |||
- android-30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest you to use some lower level of Emulator as it may lead to compatibility issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I installed Pixel 3a emulator android-28, and removed the android-30 line, that would do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gaurivn this has nothing to do with your the emulator on your system. Here you are just specifying emulator specifications that would run on Docker on Travis' servers. I hope this explanation helps :)
.travis.yml
Outdated
@@ -6,12 +6,18 @@ android: | |||
- tools | |||
- build-tools-28.0.3 | |||
- android-28 | |||
- android-30 | |||
- sys-img-x86-android-27 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since most android devices are based on arm processors, please use sys-img-armeabi-v7a-android-<your emulator level>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should change it as the x86 abi image is invalid Error: Invalid --abi x86 for the selected target
is occurring, you can checkout this from here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had seen the error but before that when I ran with x86 the error was a kernel qemu file missing following which I read an answer on Travis Build working only till 27, that's why I didn't change it. I will change to to armeabi-v7a
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ echo no | android create avd --force -n test -t android-27 --abi armeabi-v7a Valid ABIs: no ABIs. Error: Invalid --abi armeabi-v7a for the selected target. The command "echo no | android create avd --force -n test -t android-27 --abi armeabi-v7a" failed and exited with 1 during .
The emulator whose ini file I renamed to test.ini has the following specs.
before_install: | ||
- yes | ${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-28" | ||
- emulator -avd test -no-audio -no-window & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move 13, 14 lines below 16 line as currently, this is trying to initiate the emulator before creating the virtual environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
.travis.yml
Outdated
before_script: | ||
- echo no | android create avd --force -n test -t android-30 --abi x86 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please replace the abi level here with the suggested one
@devansh-299 thank you so much for your review here 🙌 |
@devansh-299 , thank you very much for the review, will need your help later on. I got the error that kernel-qemu file is missing, I'll try solving that and use armeabi-v7a. |
@@ -5,13 +5,17 @@ android: | |||
- platform-tools | |||
- tools | |||
- build-tools-28.0.3 | |||
- android-28 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you have to specify the API level and the emulator level, so please do not delete -android-<level>
. You need to specify for both of these separately, so you will have to add these lines
-android-<your_API_level>
-android-<your_emulator_level>
I hope this helps :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- android-28
- android-27
Okay will add back.
Thank you @devansh-299 , I'll make changes according to the script you provided. In case that doesn't work, then I'll follow the stack overflow one. |
@gaurivn @isabelcosta @anitab-org/coding-team the problem with the |
@gaurivn please squash the commits |
@devansh-299 , I was thinking of committing again by adding google_apis-google-21 etc. to see if it works. Do you suggest I try again, changing android-22 to the one I said or do I squash all the commits made so far |
Done |
Thank you so much @devansh-299 for helping @gaurivn in this PR 🙌 |
Welcome, @isabelcosta :) |
@devansh-299 agreed |
@anitab-org/coding-team @devansh-299 can anyone here create the issues for fixing the tests that are failing? I am not sure which tests are failing, and I am low on bandwidth for this |
@isabelcosta sure! I will work on this |
@gaurivn are you interested in continuing this issue? |
@isabelcosta, I won't be able to continue this issue for the time being, pls feel free to close this PR. |
@gaurivn no problem! thank you for letting me know 🤗 |
Description
Added test emulators to Travis CI configuration.
Fixes #168
Type of Change:
Delete irrelevant options.
Code/Quality Assurance Only
How Has This Been Tested?
Describe the tests you ran to verify your changes. Provide instructions or GIFs so we can reproduce. List any relevant details for your test.
Checklist:
Delete irrelevant options.
Code/Quality Assurance Only