doc-ai / tensorio-android

TensorIO for Android
2 stars 6 forks source link

move test assets from main to androidTests #192

Closed phildow closed 3 years ago

phildow commented 3 years ago

When adding tests and assets for tests, add them to an androidTest folder in the module rather than main or test folder, and then use the testContext rather than the appContext in the integration tests.

The difference is that assets in the main folder will be embedded with the module when it is deployed via JitPack and consequently show up as assets in whatever project has it as a dependency. Assets in the androidTest folder will not.

I first noticed this with NetRunner, which would scan its assets directory for embedded tiobundles. We only wanted the application's tiobundles to be included, but all the tiobundles from the tensor/io tests were showing up as well. Moving them out of main and into androidAssets fixed that.

phildow commented 3 years ago

@SamLeroux I notice you were able to re-use many of the existing tests from the tensorflow/tflite implementations. Did you rewrite those models in pytorch or did you just use a conversion script? Did you make a note of the process anywhere?