Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Cannot run test with EmbeddedNativeLibrary #76

Open
ursen opened this issue Dec 19, 2016 · 3 comments
Open

Cannot run test with EmbeddedNativeLibrary #76

ursen opened this issue Dec 19, 2016 · 3 comments
Assignees

Comments

@ursen
Copy link

ursen commented Dec 19, 2016

Hi,
We are having problems running NUnit Unit Tests in a Xamarin.Android Project.
We are trying to test an Android Class Library Project that is using four EmbeddedNativeLibraries internally. When trying to run our NUnit unit test it fails on loading the libraries with the error

DllImport attempting to load: 'libNAME.so'.
12-19 18:07:54.561 D/Mono (13724): DllImport error loading library '/storage/emulated/0/Android/data/NAME.Api.Wrapper.Test.Runner/files/.override/libNAME.so': 'dlopen failed: library "/data/app/NAME.Api.Wrapper.Test.Runner-1/lib/arm//storage/emulated/0/Android/data/NAME.Api.Wrapper.Test.Runner/files/.override/libNAME.so" not found'.
12-19 18:07:54.562 D/Mono (13724): DllImport error loading library '/storage/emulated/0/Android/data/NAME.Api.Wrapper.Test.Runner/files/.override/libNAME.so': 'dlopen failed: library "/data/app/NAME.Api.Wrapper.Test.Runner-1/lib/arm//storage/emulated/0/Android/data/NAME.Api.Wrapper.Test.Runner/files/.override/libNAME.so" not found'.
12-19 18:07:54.563 D/Mono (13724): DllImport error loading library '/system/lib/libNAME.so': 'dlopen failed: library "/data/app/NAME.Api.Wrapper.Test.Runner-1/lib/arm//system/lib/libNAME.so" not found'.
12-19 18:07:54.564 D/Mono (13724): DllImport error loading library '/system/lib/libNAME.so': 'dlopen failed: library "/data/app/NAME.Api.Wrapper.Test.Runner-1/lib/arm//system/lib/libNAME.so" not found'.
12-19 18:07:54.566 D/Mono (13724): DllImport error loading library 'libNAME.so': 'dlopen failed: library "libNAME_imaging.so" not found'.
12-19 18:07:54.567 D/Mono (13724): DllImport error loading library 'libNAME.so': 'dlopen failed: library "libNAME_imaging.so" not found'.
12-19 18:07:54.573 D/Mono (13724): DllImport error loading library 'libNAME.so': 'dlopen failed: library "libNAME_imaging.so" not found'.
12-19 18:07:54.573 W/Mono (13724): DllImport unable to load library 'dlopen failed: library "libNAME_imaging.so" not found'.

Things we have done so far:

  • We have created a test runner project for Android using the NUnit templates given here: Templates.
  • The test runner project is using NUnit and nunit.xamarin version 3.0.1.
  • We are not using Xamarin.Forms anywhere, just Xamarin.Android.
  • The Android Library Project we are trying to test is not doing any UI stuff.
  • We tried putting a copy of the libraries into the test runner project.
  • We tried having the test in the test runner project and in a separate test project.
  • We looked into the dll, the apk and checked the file system of our test device via adb. The libraries were present in all places.

Are we doing something wrong or is this simply not supported ?

@rprouse
Copy link
Member

rprouse commented Dec 20, 2016

It looks like you have tried everything that I would have tried and then some. When I get a chance, I will try to reproduce with a simpler project and see if I can offer any suggestions or solutions.

@rprouse rprouse self-assigned this Dec 20, 2016
@ursen
Copy link
Author

ursen commented Jan 25, 2017

Hi,
Are there any updates on this ?

@ursen
Copy link
Author

ursen commented Feb 20, 2017

@rprouse Not meaning to bother you, are there any updates to this ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants