Skip to content

Enable compiler/* tests for Scala.js #7309

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

Merged
merged 1 commit into from
Sep 28, 2019
Merged

Enable compiler/* tests for Scala.js #7309

merged 1 commit into from
Sep 28, 2019

Conversation

neshkeev
Copy link
Contributor

The following tests for the compiler/* group enabled:

  • compiler/PatMatOuterPointerCheckTest.scala
  • compiler/OuterClassTest.scala
  • compiler/MatchTest.scala
  • compiler/LongTest.scala
  • compiler/ArrayTest.scala

Signed-off-by: Nikita Eshkeev [email protected]

@nicolasstucki
Copy link
Contributor

@neshkeev I wonder if it would make sense to convert the whitelist of tests into a blacklist. This could make simpler to enable new tests. Would you have a look at that option? Do you know what is the proportion of tests we run?

@neshkeev
Copy link
Contributor Author

@nicolasstucki , great idea, I have been thinking about it recently.

Blacklist proposal

I was thinking about introducing a new operator either ^^ or ~~ (dual to **) for inversion of FileFilter, so the this line:

 (dir / "shared/src/test/scala/org/scalajs/testsuite/compiler" ** (("IntTest.scala": FileFilter) || "UnitTest.scala" || "ShortTest.scala" || "PatMatOuterPointerCheckTest.scala" || "OuterClassTest.scala" || "MatchTest.scala" || "LongTest.scala" || "FloatTest.scala" || "DoubleTest.scala" || "CharTest.scala" || "ByteTest.scala" || "BooleanTest.scala" || "ArrayTest.scala")).get

gets translated to this (|| replaced with its canonical dual &&):

 (dir / "shared/src/test/scala/org/scalajs/testsuite/compiler" ~~ (("RegressionTest.scala": FileFilter) && "ReflectiveCallTest.scala")).get

What do you think? Should I convert this proposal to an issue?

About proportion of enabled tests

There are 166 *.scala files in scala-js/test-suite/shared/src/test/scala/org/scalajs/testsuite/ and currently 80 (85 after this PR gets merged) tests (in master) are enabled.
Although there are three directories that have not been processed yet: niobuffer, niocharset, scalalib. They contain 25 *.scala files

Additional

Also I noticed that when a wrong path to a file is specified (due to a typo), then no failures are reported, sbt simply ignores these files, should we do something about it? I would like it to fail tests if a file is not found, otherwise that section will eventually contain non-existing files. What do you think?

@sjrd
Copy link
Member

sjrd commented Sep 25, 2019

There already exists an operator --, which you can combine with a * pattern on the left and the exclusion list on the right.

About the no failures reported: it is annoying, yes. A blacklist-based thing will help with this issue by construction.

@neshkeev
Copy link
Contributor Author

@sjrd Thank you for showing this operator, I updated the pull-request

@neshkeev
Copy link
Contributor Author

neshkeev commented Sep 26, 2019

@sjrd , please merge this pull-request if possible

@sjrd
Copy link
Member

sjrd commented Sep 27, 2019

It currently has conflicts.

The following tests for the compiler/* group enabled:

- compiler/IntTest.scala
- compiler/UnitTest.scala
- compiler/ShortTest.scala
- compiler/PatMatOuterPointerCheckTest.scala
- compiler/OuterClassTest.scala
- compiler/MatchTest.scala
- compiler/LongTest.scala
- compiler/FloatTest.scala
- compiler/DoubleTest.scala
- compiler/CharTest.scala
- compiler/ByteTest.scala
- compiler/BooleanTest.scala
- compiler/ArrayTest.scala

Signed-off-by: Nikita Eshkeev <[email protected]>
@neshkeev
Copy link
Contributor Author

@sjrd , the conflict has been resolved

@sjrd sjrd merged commit 4695546 into scala:master Sep 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants