Skip to content

Commit aef99eb

Browse files
committed
Make legacy tests a proper JUnit category
1 parent 1c51fd9 commit aef99eb

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

compiler/test/dotc/LegacyTests.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package dotc
2+
3+
/** Legacy tests category for JUnit */
4+
trait LegacyTests

compiler/test/dotc/tests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import scala.io.Source
1515
* =======
1616
* These are legacy, do not add tests here, see `CompilationTests.scala`
1717
*/
18-
@Category(Array(classOf[java.lang.Exception]))
18+
@Category(Array(classOf[LegacyTests]))
1919
class tests extends CompilerTest {
2020

2121
// tests that match regex '(pos|dotc|run|java|compileStdLib)\.*' would be

project/Build.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,12 +468,12 @@ object Build {
468468

469469
test in Test := {
470470
// Exclude legacy tests by default
471-
(testOnly in Test).toTask(" -- --exclude-categories=java.lang.Exception,dotty.tools.dotc.SlowTests").value
471+
(testOnly in Test).toTask(" -- --exclude-categories=dotc.LegacyTests,dotty.tools.dotc.SlowTests").value
472472
},
473473

474474
testAll in Test := {
475475
// Exclude legacy tests by default
476-
(testOnly in Test).toTask(" -- --exclude-categories=java.lang.Exception").value
476+
(testOnly in Test).toTask(" -- --exclude-categories=dotc.LegacyTests").value
477477
},
478478

479479
vulpix := Def.inputTaskDyn {

0 commit comments

Comments
 (0)