How to build integration test as cdylib?

I have a library, which compiles to cdylib ( and being loaded by the app as plugin.
I want to test the library functions by the additional test cdylib ( But only approach I come to β€” is making a workspace with separate crate of test_mylib, that has integration test, that runs the app.

Is there a way to build as integration test step?

My crate structure: should build (*.so)
and should install *.so to app and run the app.

Currntly fails, as it can not find *.so of integration test.

1 Like

Well, it seems, like you still need a separate crate to do so.
I've finished with a following test organization:

β”œβ”€β”€ Cargo.toml
β”œβ€”β€” my_lib
β”œ   β”œβ€”β€” src
β”‚      └──
└── test
    β”œβ”€β”€ Cargo.toml
    β”œβ”€β”€ src
    β”‚   └──
    └── tests

here the test crate: GitHub - Levitanus/reaper-test: Makes testing reaper extension easy

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.