diff --git a/frontend/src/test/scala/bloop/bsp/BspBaseSuite.scala b/frontend/src/test/scala/bloop/bsp/BspBaseSuite.scala index e2a0b78e3..a96dbd728 100644 --- a/frontend/src/test/scala/bloop/bsp/BspBaseSuite.scala +++ b/frontend/src/test/scala/bloop/bsp/BspBaseSuite.scala @@ -620,6 +620,14 @@ abstract class BspBaseSuite extends BaseSuite with BspClientTest { } } + def testMac(name: String)(fun: => Any): Unit = { + if (isMac) { + super.test(name)(fun) + } else { + super.ignore(name, "DISABLED")(fun) + } + } + private final lazy val tempDir = Files.createTempDirectory("temp-sockets") tempDir.toFile.deleteOnExit() diff --git a/frontend/src/test/scala/bloop/bsp/BspCompileSpec.scala b/frontend/src/test/scala/bloop/bsp/BspCompileSpec.scala index d73348a88..c65218da5 100644 --- a/frontend/src/test/scala/bloop/bsp/BspCompileSpec.scala +++ b/frontend/src/test/scala/bloop/bsp/BspCompileSpec.scala @@ -172,7 +172,7 @@ class BspCompileSpec( } } - testNonWindows( + testMac( "create orphan client classes directory and make sure loading a BSP session cleans it up" ) { TestUtil.withinWorkspace { workspace => diff --git a/frontend/src/test/scala/bloop/testing/BaseSuite.scala b/frontend/src/test/scala/bloop/testing/BaseSuite.scala index f49e4dcb5..93bf15b7c 100644 --- a/frontend/src/test/scala/bloop/testing/BaseSuite.scala +++ b/frontend/src/test/scala/bloop/testing/BaseSuite.scala @@ -34,6 +34,7 @@ import utest.ufansi.Str abstract class BaseSuite extends TestSuite with BloopHelpers { val pprint = _root_.pprint.PPrinter.BlackWhite def isWindows: Boolean = bloop.util.CrossPlatform.isWindows + def isMac: Boolean = bloop.util.CrossPlatform.isMac def isAppveyor: Boolean = "True" == System.getenv("APPVEYOR") def beforeAll(): Unit = () def afterAll(): Unit = ()