Leont / app-prove6

A test harness script for perl6
Artistic License 2.0
4 stars 5 forks source link

Doesn't seem to use ENV variables #9

Open gdonald opened 2 years ago

gdonald commented 2 years ago

I have to set export DYLD_LIBRARY_PATH="/opt/homebrew/Cellar/postgresql/14.3/lib/" to use DBIish with Postgres on my Mac. Details: https://github.com/raku-community-modules/DBIish/issues/229

This solution doesn't seem to work when I run prove6 on my tests. It acts as if I do not have the environment variable set. My tests run fine if I do raku -Ilib t/001-basic.t6 or similar. If I just run prove6 I get errors described in the above issue.

Also tried prove6 -e="raku -Ilib" t/ but it didn't help.

Any idea why prove6 would ignore my environment variable?

Thanks.

Leont commented 2 years ago

Can you give a little more information. What is your actual prove6 invocation? (and does it include -l or -Ilib?). What is the exact error?

gdonald commented 2 years ago

My prove6 invocation is prove6 -l t. The exact error is DBIish: DBDish::Pg needs 'pq', not found.

In this issue https://github.com/raku-community-modules/DBIish/issues/229 we discovered I needed DYLD_LIBRARY_PATH=/opt/homebrew/Cellar/postgresql/14.3/lib/ to get my implementation code working. That same solution does not seem to work when I run prove6.

Leont commented 2 years ago

I can't think of anything that should cause any particular issues in that area. Do you observe the same issue when running raku -Ilib t/001-basic.t6 from a raku script?

gdonald commented 2 years ago

raku -Ilib t/001-basic.t6 works fine.

Leont commented 2 years ago

raku -Ilib t/001-basic.t6 works fine.

But does raku -e 'run <raku -Ilib t/001-basic.t6>' also work? If it does I have no idea what could be going on here.

gdonald commented 2 years ago

raku -e 'run <raku -Ilib t/001-basic.t6>' works fine.

My only theory is prove6 doesn't see my environment variable. My print and say statements do not print anything when I add them to a test, so I don't know if my environment variable is available in there or not.