Skip to content

Commit 89ebc9a

Browse files
committed
Make sure that tests that compile and link keep doing so.
1 parent 395a435 commit 89ebc9a

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

project/Build.scala

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,7 @@ object Build {
10241024
(dir ** filter).get
10251025
},
10261026

1027+
// A first blacklist of tests for those that do not compile or do not link
10271028
managedSources in Test ++= {
10281029
val dir = fetchScalaJSSource.value / "test-suite"
10291030
(
@@ -1037,7 +1038,6 @@ object Build {
10371038
++ (dir / "shared/src/test/require-jdk7" ** "*.scala").get
10381039

10391040
++ (dir / "js/src/test/scala/org/scalajs/testsuite/compiler" ** (("*.scala": FileFilter)
1040-
-- "InteroperabilityTest.scala" // 3 tests require JS exports, all other tests pass
10411041
-- "RuntimeTypesTest.scala" // compile errors: no ClassTag for Null and Nothing
10421042
)).get
10431043

@@ -1046,20 +1046,10 @@ object Build {
10461046
)).get
10471047

10481048
++ (dir / "js/src/test/scala/org/scalajs/testsuite/jsinterop" ** (("*.scala": FileFilter)
1049-
-- "AsyncTest.scala" // needs JS exports in PromiseMock.scala
1050-
-- "DynamicTest.scala" // one test requires JS exports, all other tests pass
1051-
-- "ExportsTest.scala" // JS exports
1052-
-- "JSExportStaticTest.scala" // JS exports
1053-
-- "NonNativeJSTypeTest.scala" // 1 test fails because of a progression for value class fields (needs an update upstream)
1049+
-- "ExportsTest.scala" // JS exports + do not compile because of a var in a structural type
10541050
)).get
10551051

1056-
++ (dir / "js/src/test/scala/org/scalajs/testsuite/junit" ** (("*.scala": FileFilter)
1057-
// Tests fail
1058-
-- "JUnitAbstractClassTest.scala"
1059-
-- "JUnitNamesTest.scala"
1060-
-- "JUnitSubClassTest.scala"
1061-
-- "MultiCompilationSecondUnitTest.scala"
1062-
)).get
1052+
++ (dir / "js/src/test/scala/org/scalajs/testsuite/junit" ** "*.scala").get
10631053

10641054
++ (dir / "js/src/test/scala/org/scalajs/testsuite/library" ** (("*.scala": FileFilter)
10651055
-- "ObjectTest.scala" // compile errors caused by #9588
@@ -1076,6 +1066,25 @@ object Build {
10761066
++ (dir / "js/src/test/require-sam" ** "*.scala").get
10771067
++ (dir / "js/src/test/scala-new-collections" ** "*.scala").get
10781068
)
1069+
},
1070+
1071+
// A second blacklist for tests that compile and link, but do not pass at run-time.
1072+
// Putting them here instead of above makes sure that we do not regress on compilation+linking.
1073+
Test / testOptions += Tests.Filter { name =>
1074+
!Set[String](
1075+
"org.scalajs.testsuite.compiler.InteroperabilityTest", // 3 tests require JS exports, all other tests pass
1076+
1077+
"org.scalajs.testsuite.jsinterop.AsyncTest", // needs JS exports in PromiseMock.scala
1078+
"org.scalajs.testsuite.jsinterop.DynamicTest", // one test requires JS exports, all other tests pass
1079+
"org.scalajs.testsuite.jsinterop.JSExportStaticTest", // JS exports
1080+
"org.scalajs.testsuite.jsinterop.NonNativeJSTypeTest", // 1 test fails because of a progression for value class fields (needs an update upstream)
1081+
1082+
// Not investigated so far
1083+
"org.scalajs.testsuite.junit.JUnitAbstractClassTestCheck",
1084+
"org.scalajs.testsuite.junit.JUnitNamesTestCheck",
1085+
"org.scalajs.testsuite.junit.JUnitSubClassTestCheck",
1086+
"org.scalajs.testsuite.junit.MultiCompilationSecondUnitTestCheck",
1087+
).contains(name)
10791088
}
10801089
)
10811090

0 commit comments

Comments
 (0)