Skip to content

Run tests on Android #246

Open
Open

Description

@nmittler

Currently all of our tests run against the openjdk module. We should investigate running them all for Android as well (using emulators).

Some helpful links:
Getting Started with Testing
Testing Your App
Building Instrumented Unit Tests
Samples

Activity

  1. added this to the 1.0.1 milestone on Jul 6, 2017
  2. desokroshan commented on Mar 25, 2019

    @desokroshan

    I am unable to run android unit tests when using org.conscrypt:conscrypt-android:2.0.0 as my dependency. I am running into following error when trying to add OpenSSLProvider as a Security Provider :

    java.lang.UnsatisfiedLinkError: no conscrypt_jni in java.library.path
    
    	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
    	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    	at java.lang.System.loadLibrary(System.java:1122)
    	at org.conscrypt.NativeCryptoJni.init(NativeCryptoJni.java:28)
    	at org.conscrypt.NativeCrypto.<clinit>(NativeCrypto.java:65)
    	at org.conscrypt.OpenSSLProvider.<init>(OpenSSLProvider.java:60)
    	at org.conscrypt.OpenSSLProvider.<init>(OpenSSLProvider.java:53)
    	at org.conscrypt.OpenSSLProvider.<init>(OpenSSLProvider.java:49)

    Since unit tests run on the local machine, it fails to link native libraries that are compiled for different platform? Is there a workaround/solution available for this?

  3. flooey commented on Mar 27, 2019

    @flooey
    Contributor

    We include native libraries for x86 and x86_64 in the Android distribution, so if you're running an Android test it should work fine. Do you have a small sample project that demonstrates the problem? (Also, please separate this into its own issue, since it's unrelated to this one.)

  4. desokroshan commented on Mar 27, 2019

    @desokroshan

    Thanks for getting back. I have opened a new issue #649 with a sample project that reproduces the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions