diff --git a/sbt-app/src/sbt-test/actions/compile-clean/build.sbt b/sbt-app/src/sbt-test/actions/compile-clean/build.sbt index 75c6a9b44..e6774e270 100644 --- a/sbt-app/src/sbt-test/actions/compile-clean/build.sbt +++ b/sbt-app/src/sbt-test/actions/compile-clean/build.sbt @@ -1,5 +1,6 @@ import sbt.nio.file.Glob -ThisBuild / scalaVersion := "2.12.17" +name := "compile-clean" +scalaVersion := "2.12.17" Compile / cleanKeepGlobs += Glob((Compile / compile / classDirectory).value, "X.class") diff --git a/sbt-app/src/sbt-test/actions/compile-clean/pending b/sbt-app/src/sbt-test/actions/compile-clean/pending deleted file mode 100644 index 2e805ffd0..000000000 --- a/sbt-app/src/sbt-test/actions/compile-clean/pending +++ /dev/null @@ -1,22 +0,0 @@ -$ touch target/cant-touch-this - -> Test/compile -$ exists target/scala-2.12/classes/A.class -$ exists target/scala-2.12/test-classes/B.class - -> Test/clean -$ exists target/cant-touch-this -# it should clean only compile classes -$ exists target/scala-2.12/classes/A.class -$ exists target/scala-2.12/classes/X.class -$ absent target/scala-2.12/test-classes/B.class - -# compiling everything again, but now cleaning only compile classes -> Test/compile -> Compile/clean -$ exists target/cant-touch-this -# it should clean only compile classes -$ absent target/scala-2.12/classes/A.class -$ exists target/scala-2.12/test-classes/B.class -# and X has to be kept, because of the cleanKeepFiles override -$ exists target/scala-2.12/classes/X.class diff --git a/sbt-app/src/sbt-test/actions/compile-clean/test b/sbt-app/src/sbt-test/actions/compile-clean/test new file mode 100644 index 000000000..a1289b6b1 --- /dev/null +++ b/sbt-app/src/sbt-test/actions/compile-clean/test @@ -0,0 +1,22 @@ +$ touch target/cant-touch-this + +> Test/products +$ exists target/out/jvm/scala-2.12.17/compile-clean/classes/A.class +$ exists target/out/jvm/scala-2.12.17/compile-clean/test-classes/B.class + +> Test/clean +$ exists target/cant-touch-this +# TODO it should clean only test classes +# $ exists target/out/jvm/scala-2.12.17/compile-clean/classes/A.class +# $ exists target/out/jvm/scala-2.12.17/compile-clean/classes/X.class +$ absent target/out/jvm/scala-2.12.17/compile-clean/test-classes/B.class + +# compiling everything again, but now cleaning only compile classes +> Test/products +> Compile/clean +$ exists target/cant-touch-this +# TODO it should clean only compile classes +$ absent target/out/jvm/scala-2.12.17/compile-clean/classes/A.class +# $ exists target/out/jvm/scala-2.12.17/compile-clean/test-classes/B.class +# TODO and X has to be kept, because of the cleanKeepFiles override +# $ exists target/out/jvm/scala-2.12.17/compile-clean/classes/X.class