-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add a way filter FromTasty tests #4607
Conversation
In sbt use: `testFromTasty XYZ` It does the same as `testCompilation XYZ` but on the tasty tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
project/Build.scala
Outdated
else "" | ||
} | ||
(testOnly in Test).toTask(cmd) | ||
}.evaluated, |
There was a problem hiding this comment.
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)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
be99ba6
to
c10db17
Compare
project/Build.scala
Outdated
@@ -1237,4 +1234,13 @@ object Build { | |||
case BootstrappedOptimised => commonOptimisedSettings | |||
}) | |||
} | |||
|
|||
def testOnlyFiltered(test: String, options: String) = Def.inputTaskDyn { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
In sbt use:
testFromTasty XYZ
It does the same as
testCompilation XYZ
but on the tasty tests