mirror of https://github.com/sbt/sbt.git
Create test for configuration ordering regression.
This commit is contained in:
parent
10afd46785
commit
57adb5ff7a
|
|
@ -0,0 +1,17 @@
|
|||
lazy val foo = taskKey[Unit]("Runs the foo task")
|
||||
|
||||
lazy val bar = taskKey[Unit]("Runs the bar task")
|
||||
|
||||
def makeFoo(config: Configuration): Setting[_] =
|
||||
foo in config := IO.write(file(s"${config.name}-foo"), "foo")
|
||||
|
||||
lazy val PerformanceTest = (config("pt") extend Test)
|
||||
|
||||
lazy val root = (
|
||||
(project in file("."))
|
||||
.configs(PerformanceTest)
|
||||
.settings(Seq(Compile, Test, Runtime, PerformanceTest).map(makeFoo) :_*)
|
||||
.settings(
|
||||
bar in PerformanceTest := IO.write(file("pt-bar"), "bar")
|
||||
)
|
||||
)
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# First make sure a task just on the new config delegates.
|
||||
> bar
|
||||
$ exists pt-bar
|
||||
|
||||
|
||||
# Now make sure compile is the default configuration
|
||||
> foo
|
||||
$ exists compile-foo
|
||||
Loading…
Reference in New Issue