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

Run tests in Android simulator in CI #396

Closed
gavv opened this issue Jun 28, 2020 · 6 comments
Closed

Run tests in Android simulator in CI #396

gavv opened this issue Jun 28, 2020 · 6 comments
Assignees
Labels
android Android-related tasks continuous integration Continuous integration easy hacks The solution is expected to be straightforward even if you are new to the project help wanted An important and awaited task but we have no human resources for it yet much-needed This issue is needed most among other help-wanted issues
Milestone

Comments

@gavv
Copy link
Member

gavv commented Jun 28, 2020

Currently we have Android build in Travis, but it doesn't run unit tests. It is defined here.

It would be nice to run tests on Travis using Android simulator.

We already have env-android docker image that provides Android SDK and emulator, and a helper script to manage simulator devices:

This image is used in our java bindings to run java tests in simulator, which was implemented here: roc-streaming/roc-java#21.

Now we want to employ a similar approach for our C++ tests. In java bindings we're using gradle, and to run C++ tests we can use adb as mentioned here: roc-streaming/roc-java#21 (comment)

Travis scripts are located here: https://github.com/roc-streaming/roc-toolkit/tree/develop/scripts/travis

An example of running tests manually from travis scripts can be found here. Those scripts also run tests in an emulated environment, but they use qemu instead of android simulator.

Related: #390.

@gavv gavv added help wanted An important and awaited task but we have no human resources for it yet android Android-related tasks build system Build system labels Jun 28, 2020
@gavv gavv added this to Frontlog in kanban board via automation Jun 28, 2020
@gavv gavv moved this from Frontlog to Help wanted in kanban board Jun 28, 2020
@gavv gavv added easy hacks The solution is expected to be straightforward even if you are new to the project help wanted An important and awaited task but we have no human resources for it yet and removed easy hacks The solution is expected to be straightforward even if you are new to the project help wanted An important and awaited task but we have no human resources for it yet labels Jun 28, 2020
@gavv gavv added easy hacks The solution is expected to be straightforward even if you are new to the project much-needed This issue is needed most among other help-wanted issues labels Jul 4, 2020
@gavv gavv added continuous integration Continuous integration and removed build system Build system labels Jul 13, 2020
@MatteoArella
Copy link
Member

I can easily work on this

@gavv
Copy link
Member Author

gavv commented Jul 26, 2020

Great!

@gavv
Copy link
Member Author

gavv commented Sep 21, 2020

Done, except failing tests on i686: #424.

@gavv gavv closed this as completed Sep 21, 2020
kanban board automation moved this from Help wanted to Done Sep 21, 2020
@gavv gavv added this to the 0.2.0 milestone Sep 21, 2020
@gavv
Copy link
Member Author

gavv commented Sep 23, 2020

Just caught an error on x86_64:

--- installing system image android-29;default;x86_64

Warning: An error occurred while preparing SDK package Intel x86 Atom_64 System Image: Connection reset.

The command "scripts/travis/android.sh API=29 NDK_VERSION=21.1.6352462 ABI=x86_64 scripts/travis/android/linux-android.sh" exited with 1.

https://travis-ci.org/github/gavv/roc-toolkit/jobs/729580567

@MatteoArella any ideas?

@gavv gavv reopened this Sep 23, 2020
kanban board automation moved this from Done to In progress Sep 23, 2020
@MatteoArella
Copy link
Member

Just caught an error on x86_64:

--- installing system image android-29;default;x86_64

Warning: An error occurred while preparing SDK package Intel x86 Atom_64 System Image: Connection reset.

The command "scripts/travis/android.sh API=29 NDK_VERSION=21.1.6352462 ABI=x86_64 scripts/travis/android/linux-android.sh" exited with 1.

https://travis-ci.org/github/gavv/roc-toolkit/jobs/729580567

@MatteoArella any ideas?

Connection reset on download seems unrelated to #419 PR but it seems rather a travis network connectivity problem. Did you encounter this problem before or it is the first time?
If you prefer, as you suggested time ago, we can try caching android sdk inside distfiles repo and see if it is an achievable solution.

@gavv
Copy link
Member Author

gavv commented Sep 28, 2020

Connection reset on download seems unrelated to #419 PR but it seems rather a travis network connectivity problem

Oh, I see. I though it's connection to emulator, but if it's just an error during download, I agree it's unrelated.

Did you encounter this problem before or it is the first time?

This is the first time.

If you prefer, as you suggested time ago, we can try caching android sdk inside distfiles repo and see if it is an achievable solution.

Let's indeed close this issue. I'll add a comment regarding SDK to #405.

@gavv gavv closed this as completed Sep 28, 2020
kanban board automation moved this from In progress to Done Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Android-related tasks continuous integration Continuous integration easy hacks The solution is expected to be straightforward even if you are new to the project help wanted An important and awaited task but we have no human resources for it yet much-needed This issue is needed most among other help-wanted issues
Projects
Development

No branches or pull requests

2 participants