[graalvm-users] Testing polyglot libs
Chris Seaton
chris.seaton at oracle.com
Thu Jun 14 08:55:09 PDT 2018
It sounds like you are trying the correct things, and thanks for your perseverance and questions.
> On 14 Jun 2018, at 16:25, Rodrigo Botafogo <rodrigo.a.botafogo at gmail.com> wrote:
>
> Hello,
>
> I'm trying to set up testing for my polyglot lib and I'm having a hard time. Sorry if I should post somewhere else...
>
> So I tried to test with rspec, but rspec will run ruby somehow and does not pass to ruby the --polyglot --jvm flags.
You should be able to run `--polyglot --native` if you rebuild the ruby image after installing both R and Ruby, by running `gu rebuild-images ruby`.
> Polyglot complains that R is not a known language. I've googled around and could not find an easy way to make rspec pass flags to ruby.
How are you running RSpec? Are you using `bundle` or `rake`?
Can you run `ruby --polyglot --jvm -S rspec`?
Or there is the environment variable `TRUFFLERUBYOPT` - try putting `--jvm --polyglot` into that, like `TRUFFLERUBYOPT='--jvm --polyglot' rspec`.
> Next I tried minitest, since in this case I call ruby directly with the required flags... but polyglot complains that R cannot execute in multithreaded,
I’m afraid this is a limitation of FastR at the moment - it just doesn’t support multiple threads. GraalJS also does not support multiple threads.
> so I passed -Xsingle_threaded to ruby and minitest complains that it only runs in a multithreaded environment.
Can you somehow run minitest without it trying to create threads? What does it use the threads for? And what does its complaint look like?
> Any suggestions how to move forward?
>
>
> Thanks
>
>
>
>
> --
> Rodrigo Botafogo
> _______________________________________________
> GraalVM-Users mailing list
> GraalVM-Users at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/graalvm-users
More information about the GraalVM-Users
mailing list