How to test shared_module?
#11208
Answered
by
eli-schwartz
chriselrod
asked this question in
Q&A
|
I have a project that builds a shared module: my_shared_module = shared_module(...)I would like to test it via running an executable that supports loading modules FILE *fopt = popen("opt -load-pass-plugin=path/to/my_shared_module.so moreargs path/to/file.ll", "r")and then compare the results with some expected results: FILE *ftxt = fopen("path/to/cmpfile.txt", "r")However, I have two problems here:
Or, is there a better approach? |
Answered by
eli-schwartz
Dec 21, 2022
Replies: 2 comments 3 replies
|
Perhaps I can solve the path via defining a macro to be |
0 replies
test('name', exe, ..., depends: [my_shared_module])
How are you running it? If you pass a built target as part of the There's also |
3 replies
Answer selected by
chriselrod
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/moduleinstead of--flag path/to/module. But in that case you needdepends:as meson cannot figure out dependencies automatically from a string.