Skip to content

How to test shared_module? #11208

Answered by eli-schwartz
chriselrod asked this question in Q&A
Discussion options

You must be logged in to vote
  1. I do not know how to declare my_shared_module.so as a dependency of the test. It is not a shared library, but a shared module loaded by the executable.
test('name', exe, ..., depends: [my_shared_module])
  1. I do not know how to set the relative paths correctly so that this works on CI.

How are you running it? If you pass a built target as part of the args: kwarg, Meson will guarantee the path resolves correctly to the built object.

There's also my_shared_module.full_path() to yield a string. This may be necessary if it must be --flag=path/to/module instead of --flag path/to/module. But in that case you need depends: as meson cannot figure out dependencies automatically from a string.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@chriselrod
Comment options

@eli-schwartz
Comment options

@chriselrod
Comment options

Answer selected by chriselrod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants