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

add scipy/lapack CI tests #2617

Merged
merged 4 commits into from
Jun 11, 2022
Merged

add scipy/lapack CI tests #2617

merged 4 commits into from
Jun 11, 2022

Conversation

mzakharo
Copy link
Contributor

@mzakharo mzakharo commented Jun 6, 2022

Adding CI tests for downloading and extracting LEGACY_NDK , gfortran to build lapack/scipy. Follow-up PR to #2615

AndreMiras
AndreMiras previously approved these changes Jun 6, 2022
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

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

Awesome! Great effort thank you 🙏
@misl6 feel free to merge if you're happy with it too

@misl6
Copy link
Member

misl6 commented Jun 6, 2022

As said on Discord, looks absolutely fine to me to add a test regarding scipy as it requires a specific NDK configuration to build. Yeah, it takes some additional (in parallel) time to build, but could be optimized later.

But, before merge, how about adding a testcase on on_device_unit_tests test app that does an actual (nothing so fancy) unittest when the test app is launched?
That would be really helpful to check that everything really worked as expected, and that scipy also works on runtime.

ATM, when ubuntu-latest-sdl2_scipy-bdist_unit_tests_app-debug-1.1-.apk is launched on a device, the following log is produced, and then the app immediately crashes:

06-06 22:49:49.265  6223  6252 I python  : Imported unittest
06-06 22:49:49.275  6223  6252 I python  : App requirements are:  {'scipy', 'python3'}
06-06 22:49:49.277  6223  6252 I python  : Defined test case
06-06 22:49:49.277  6223  6252 I python  : Tests to perform are:  {}
06-06 22:49:49.277  6223  6252 I python  : 
06-06 22:49:49.277  6223  6252 I python  : ----------------------------------------------------------------------
06-06 22:49:49.277  6223  6252 I python  : Ran 0 tests in 0.000s
06-06 22:49:49.278  6223  6252 I python  : 
06-06 22:49:49.278  6223  6252 I python  : OK
06-06 22:49:49.278  6223  6252 I python  : Python for android ended.

@mzakharo
Copy link
Contributor Author

mzakharo commented Jun 9, 2022

ATM, when ubuntu-latest-sdl2_scipy-bdist_unit_tests_app-debug-1.1-.apk is launched on a device, the following log is produced, and then the app immediately crashes:

I just added a scipy test to the test app, when I launch it on my android phone, it runs the test successfully, and exits (there is no kivy in app requirements, so app exits as soon as the test is done). It does not look like there is any crash/traceback.

06-09 13:56:15.161 29777 30902 I python  : Android kivy bootstrap done. __name__ is __main__
06-09 13:56:15.161 29777 30902 I python  : AND: Ran string
06-09 13:56:15.161 29777 30902 I python  : Run user program, change dir and execute entrypoint
06-09 13:56:15.171 29777 29777 V SDL     : onWindowFocusChanged(): true
06-09 13:56:15.251 29777 30902 I python  : Imported unittest
06-09 13:56:15.252 29777 30902 I python  : App requirements are:  {'scipy', 'python3'}
06-09 13:56:15.253 29777 30902 I python  : Defined test case
06-09 13:56:15.254 29777 30902 I python  : Adding Testcase:  tests.test_requirements.ScipyTestCase
06-09 13:56:15.254 29777 30902 I python  : Tests to perform are:  {'scipy': 'tests.test_requirements.ScipyTestCase'}
06-09 13:56:15.445 29777 30902 I python  : .kmeans (array([[2.45121811, 3.03653641],
06-09 13:56:15.445 29777 30902 I python  :        [0.98872663, 1.31944737]]), 0.9088234961964715)
06-09 13:56:15.445 29777 30902 I python  : .
06-09 13:56:15.445 29777 30902 I python  : ----------------------------------------------------------------------
06-09 13:56:15.445 29777 30902 I python  : Ran 2 tests in 0.191s
06-09 13:56:15.445 29777 30902 I python  : 
06-09 13:56:15.445 29777 30902 I python  : OK
06-09 13:56:15.445 29777 30902 I python  : Python for android ended.

@misl6 :can you please help understand what is the behaviour you expect to see?

@misl6
Copy link
Member

misl6 commented Jun 9, 2022

ATM, when ubuntu-latest-sdl2_scipy-bdist_unit_tests_app-debug-1.1-.apk is launched on a device, the following log is produced, and then the app immediately crashes:

I just added a scipy test to the test app, when I launch it on my android phone, it runs the test successfully, and exits (there is no kivy in app requirements, so app exits as soon as the test is done). It does not look like there is any crash/traceback.

06-09 13:56:15.161 29777 30902 I python  : Android kivy bootstrap done. __name__ is __main__
06-09 13:56:15.161 29777 30902 I python  : AND: Ran string
06-09 13:56:15.161 29777 30902 I python  : Run user program, change dir and execute entrypoint
06-09 13:56:15.171 29777 29777 V SDL     : onWindowFocusChanged(): true
06-09 13:56:15.251 29777 30902 I python  : Imported unittest
06-09 13:56:15.252 29777 30902 I python  : App requirements are:  {'scipy', 'python3'}
06-09 13:56:15.253 29777 30902 I python  : Defined test case
06-09 13:56:15.254 29777 30902 I python  : Adding Testcase:  tests.test_requirements.ScipyTestCase
06-09 13:56:15.254 29777 30902 I python  : Tests to perform are:  {'scipy': 'tests.test_requirements.ScipyTestCase'}
06-09 13:56:15.445 29777 30902 I python  : .kmeans (array([[2.45121811, 3.03653641],
06-09 13:56:15.445 29777 30902 I python  :        [0.98872663, 1.31944737]]), 0.9088234961964715)
06-09 13:56:15.445 29777 30902 I python  : .
06-09 13:56:15.445 29777 30902 I python  : ----------------------------------------------------------------------
06-09 13:56:15.445 29777 30902 I python  : Ran 2 tests in 0.191s
06-09 13:56:15.445 29777 30902 I python  : 
06-09 13:56:15.445 29777 30902 I python  : OK
06-09 13:56:15.445 29777 30902 I python  : Python for android ended.

@misl6 :can you please help understand what is the behaviour you expect to see?

The test that you just added is probably already targeting our need, but we usually expect to have an app that shows the test results on the device where the testapp is running, so we can avoid inspecting the logs via adb (even if is a good idea to keep adb enabled while doing tests).

When building with sdl2 as a bootstrap, kivy is mandatory to show results.

This is what we expect on sdl2+kivy testapp:

Image 09-06-22 at 20 35

Something similar is also shown when using webview as a bootstrap for the testapp:

Image 09-06-22 at 20 35

1 similar comment
@misl6
Copy link
Member

misl6 commented Jun 9, 2022

ATM, when ubuntu-latest-sdl2_scipy-bdist_unit_tests_app-debug-1.1-.apk is launched on a device, the following log is produced, and then the app immediately crashes:

I just added a scipy test to the test app, when I launch it on my android phone, it runs the test successfully, and exits (there is no kivy in app requirements, so app exits as soon as the test is done). It does not look like there is any crash/traceback.

06-09 13:56:15.161 29777 30902 I python  : Android kivy bootstrap done. __name__ is __main__
06-09 13:56:15.161 29777 30902 I python  : AND: Ran string
06-09 13:56:15.161 29777 30902 I python  : Run user program, change dir and execute entrypoint
06-09 13:56:15.171 29777 29777 V SDL     : onWindowFocusChanged(): true
06-09 13:56:15.251 29777 30902 I python  : Imported unittest
06-09 13:56:15.252 29777 30902 I python  : App requirements are:  {'scipy', 'python3'}
06-09 13:56:15.253 29777 30902 I python  : Defined test case
06-09 13:56:15.254 29777 30902 I python  : Adding Testcase:  tests.test_requirements.ScipyTestCase
06-09 13:56:15.254 29777 30902 I python  : Tests to perform are:  {'scipy': 'tests.test_requirements.ScipyTestCase'}
06-09 13:56:15.445 29777 30902 I python  : .kmeans (array([[2.45121811, 3.03653641],
06-09 13:56:15.445 29777 30902 I python  :        [0.98872663, 1.31944737]]), 0.9088234961964715)
06-09 13:56:15.445 29777 30902 I python  : .
06-09 13:56:15.445 29777 30902 I python  : ----------------------------------------------------------------------
06-09 13:56:15.445 29777 30902 I python  : Ran 2 tests in 0.191s
06-09 13:56:15.445 29777 30902 I python  : 
06-09 13:56:15.445 29777 30902 I python  : OK
06-09 13:56:15.445 29777 30902 I python  : Python for android ended.

@misl6 :can you please help understand what is the behaviour you expect to see?

The test that you just added is probably already targeting our need, but we usually expect to have an app that shows the test results on the device where the testapp is running, so we can avoid inspecting the logs via adb (even if is a good idea to keep adb enabled while doing tests).

When building with sdl2 as a bootstrap, kivy is mandatory to show results.

This is what we expect on sdl2+kivy testapp:

Image 09-06-22 at 20 35

Something similar is also shown when using webview as a bootstrap for the testapp:

Image 09-06-22 at 20 35

@mzakharo
Copy link
Contributor Author

mzakharo commented Jun 9, 2022

Ok, added kivy to the dep list, I now get the screen
Screenshot_20220609-163046_unit_tests_app
.

Copy link
Member

@misl6 misl6 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@misl6 misl6 merged commit e524c0b into kivy:develop Jun 11, 2022
cclauss added a commit to cclauss/python-for-android that referenced this pull request Oct 20, 2024
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.

3 participants