Skip to content
This repository was archived by the owner on May 3, 2018. It is now read-only.

Pass down the TestFramework's arguments to SBTRunner #5

Merged
merged 1 commit into from
Nov 3, 2015

Conversation

gourlaysama
Copy link
Contributor

This gives the TestFramework's arguments to SBTRunner in
scala-partest, so that it can support the same input as the command line
version.

This assumes the necessary changes were done on the scala-partest side.

With both this change and the one in scala-partest, "sbt-partest" is
just as flexible as "ant-partest", using testOnly. For example:

sbt> testOnly -- files/pos/t6745.scala --update-check
sbt> testOnly -- --show-diff pos scalacheck

(the leading -- is necessary for now, sadly...)

This gives the TestFramework's arguments to SBTRunner in
scala-partest, so that it can support the same input as the command line
version.

This assumes the necessary changes were done on the scala-partest side.

With both this change and the one in scala-partest, "sbt-partest" is
just as flexible as "ant-partest", using `testOnly`. For example:

```
sbt> testOnly -- files/pos/t6745.scala --update-check
sbt> testOnly -- --show-diff pos scalacheck
```
(the leading `--` is necessary for now, sadly...)
@gourlaysama
Copy link
Contributor Author

See scala/scala-partest#24 for the corresponding changes in partest.

@@ -27,29 +27,8 @@ class Framework extends sbt.testing.Framework {
/** Represents one run of a suite of tests.
*/
case class Runner(args: Array[String], remoteArgs: Array[String], testClassLoader: ClassLoader) extends sbt.testing.Runner {
/** Returns an array of tasks that when executed will run tests and suites determined by the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why docs got removed?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cutting off doc bit-rot at the source!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@som-snytt
Copy link

I only use sbt test on a small scale. But it's not obvious that the way to users' hearts is to use sbt test like partest. For instance, re-running with update-check or show-diff is not my favorite thing.

@SethTisue
Copy link
Member

@szeiger should we merge this?

@szeiger
Copy link
Contributor

szeiger commented Nov 3, 2015

@SethTisue please do, it's required for scala/scala-partest#40 because the interface between scala-partest and scala-partest-interface changes

SethTisue added a commit that referenced this pull request Nov 3, 2015
Pass down the TestFramework's arguments to SBTRunner
@SethTisue SethTisue merged commit d72eddc into scala:master Nov 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants