Skip to content

Add a way filter FromTasty tests #4607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 1, 2018

Conversation

nicolasstucki
Copy link
Contributor

In sbt use: testFromTasty XYZ

It does the same as testCompilation XYZ but on the tasty tests

In sbt use: `testFromTasty XYZ`

It does the same as `testCompilation XYZ` but on the tasty tests
Copy link
Contributor

@allanrenucci allanrenucci left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

else ""
}
(testOnly in Test).toTask(cmd)
}.evaluated,
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's abstract over the testOnly input task:

def testOnly(test: String, options: String) = Def.inputTaskDyn {
  val args = spaceDelimited("<arg>").parsed
  val cmd = s" $test -- $options" + {
    if (args.nonEmpty) " -Ddotty.tests.filter=" + args.mkString(" ")
    else ""
  }
  (testOnly in Test).toTask(cmd)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@nicolasstucki nicolasstucki force-pushed the filter-from-tasty-tests branch from be99ba6 to c10db17 Compare May 31, 2018 15:21
@@ -1237,4 +1234,13 @@ object Build {
case BootstrappedOptimised => commonOptimisedSettings
})
}

def testOnlyFiltered(test: String, options: String) = Def.inputTaskDyn {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move it just above where is is used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@nicolasstucki nicolasstucki merged commit 868d199 into scala:master Jun 1, 2018
@allanrenucci allanrenucci deleted the filter-from-tasty-tests branch June 1, 2018 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants