Thanks Eugene, mapping tests to a Group with correct bootclasspath did the
trick.
I was hoping that it will figure it out on its own like with normal forked
run but that is also fine.

hubert


On Wednesday, December 19, 2012 12:53:09 PM UTC+1, Eugene Vigdorchik wrote:

On Wed, Dec 19, 2012 at 2:33 PM, Hubert Plociniczak
<hubert.pl...@gmail.com <javascript:>> wrote:
Hi,

I have a problem with forking tests in scalatest (but judging from the code,
the problem might be in other frameworks as well). I have a custom scala
compiler which is correctly set in the build file and picked up during the
compilation.
I also have some simple tests written without any help of the popular
frameworks (simple execution of main). In those tests I create a new
instance of the compiler and run it on some files. For that to work I have
to have 'fork in run := true' (or in Test for scalatest to work).
Now, I tried to port those tests to scalatest and everything is great until
I try to run them when I get the usual:
"scala.reflect.internal.MissingRequirementError: object scala.runtime in
compiler mirror not found."
When you need to modify JVM options for a forked run (appending to
bootclasspath if I understand you correctly) you can do so on a per
testgroup basis with 'testGrouping' key giving it correct
Tests.Subprocess(jvmOpts),
or if the options are the same and you need to fork all the tests in a
single JVM, you can override 'javaOptions' setting globally.

hth,
Eugene.
which suggests that my custom scala jars weren't put on the
bootclasspath.
I had a quick look into testing/src/main/scala and I don't see that
distinction being made there (classpath vs bootclasspath) but then I am not
so familiar with that part of the codebase.

Any help would be appreciated.

Thanks,
hubert

--
You received this message because you are subscribed to the Google Groups
"simple-build-tool" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/simple-build-tool/-/lOjjHKUxuEMJ.
To post to this group, send email to simple-b...@googlegroups.com<javascript:>.
To unsubscribe from this group, send email to
simple-build-t...@googlegroups.com <javascript:>.
For more options, visit this group at
http://groups.google.com/group/simple-build-tool?hl=en.
--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To view this discussion on the web visit https://groups.google.com/d/msg/simple-build-tool/-/3RM-AXWhxosJ.
To post to this group, send email to simple-build-tool@googlegroups.com.
To unsubscribe from this group, send email to simple-build-tool+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 4 | next ›
Discussion Overview
groupsimple-build-tool @
categoriesscala
postedDec 19, '12 at 10:33a
activeDec 20, '12 at 5:35p
posts4
users3
websitescala-sbt.org
irc#scala

People

Translate

site design / logo © 2022 Grokbase