Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alexlyulkov
Copy link
Contributor

@alexlyulkov alexlyulkov commented Jan 23, 2024

Modified Java tests to run on Android.

To run the tests you need to:

  1. Build OpenCV using Android pipeline. For example:
    cmake -DBUILD_TEST=ON -DANDROID=ON -DANDROID_ABI=arm64-v8a -DCMAKE_TOOLCHAIN_FILE=/usr/lib/android-sdk/ndk/25.1.8937393/build/cmake/android.toolchain.cmake -DANDROID_NDK=/usr/lib/android-sdk/ndk/25.1.8937393 -DANDROID_SDK=/usr/lib/android-sdk ../opencv
    make
  2. Connect Android Phone
  3. Run tests:
    cd android_tests
    ./gradlew tests_module:connectedAndroidTest

Related CI pipeline: opencv/ci-gha-workflow#138

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov asmorkalov added this to the 4.10.0 milestone Jan 29, 2024
@asmorkalov asmorkalov self-assigned this Jan 29, 2024
@asmorkalov asmorkalov force-pushed the al/android-tests branch 2 times, most recently from 26b2ba5 to 89ff186 Compare January 29, 2024 14:31
@alexlyulkov alexlyulkov marked this pull request as ready for review January 30, 2024 07:43
@asmorkalov
Copy link
Contributor

Please remove gradlew and gradlew.bat with related files as you use platforms/android.

minSdkVersion @ANDROID_MIN_SDK_VERSION@
targetSdkVersion @ANDROID_TARGET_SDK_VERSION@
versionCode 301
versionName "3.01"
Copy link
Contributor

Choose a reason for hiding this comment

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

version

is it correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure, but it's the same everywhere. Looks like we need to substitute OpenCV version here and in samples.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's do it in a separate PR.

Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

👍

@asmorkalov asmorkalov merged commit 8545081 into opencv:4.x Jan 31, 2024
asmorkalov added a commit to opencv/ci-gha-workflow that referenced this pull request Jan 31, 2024
Replaces #128
Depends on opencv/opencv#24910

* Added pipeline to test Android configuration with real phone.

* Cleanup environment.

* Use proper label to select host.

* Use proper label to select host.

* Set binaries cache location.

* Binaries cache path fix.

* Removed limitation.

* Set git cache location in pipeline.
This was referenced Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants