Skip to content

Commit

Permalink
Merge pull request #4300 from sjrd/fix-windows-stuff
Browse files Browse the repository at this point in the history
Fix usages of Jimfs in tests on Windows.
  • Loading branch information
sjrd committed Nov 26, 2020
2 parents b5aaaf4 + 6284c6b commit 88a19cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ environment:
global:
NODEJS_VERSION: "12"
JAVA_HOME: C:\Program Files\Java\jdk1.8.0
SCALA_VERSION: 2.12.11
SCALA_VERSION: 2.12.12
install:
- ps: Install-Product node $env:NODEJS_VERSION
- npm install
Expand All @@ -14,7 +14,8 @@ install:
build: off
test_script:
# Very far from testing everything, but at least it is a good sanity check
- cmd: sbt ";clean;++%SCALA_VERSION%;testSuite2_12/test"
# For slow things (partest and scripted), we execute only one test
- cmd: sbt ";clean;++%SCALA_VERSION%;testSuite2_12/test;linker2_12/test;partestSuite2_12/testOnly -- --fastOpt run/option-fold.scala;sbtPlugin/scripted settings/module-init"
cache:
- C:\sbt
- C:\Users\appveyor\.ivy2\cache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class PathOutputDirectoryTest {

@Test
def avoidUnnecessaryWrite(): AsyncResult = await {
val dir = Jimfs.newFileSystem().getPath("/tmp")
val dir = Jimfs.newFileSystem().getPath("tmp").toAbsolutePath()
Files.createDirectory(dir)

val fileName = "file.js"
Expand All @@ -59,7 +59,7 @@ class PathOutputDirectoryTest {

@Test
def readFull(): AsyncResult = await {
val dir = Jimfs.newFileSystem().getPath("/tmp")
val dir = Jimfs.newFileSystem().getPath("tmp").toAbsolutePath()
Files.createDirectory(dir)

val fileName = "file.js"
Expand All @@ -82,7 +82,7 @@ class PathOutputDirectoryTest {
.setAttributeViews("basic", "posix")
.build()

val dir = Jimfs.newFileSystem(config).getPath("/tmp")
val dir = Jimfs.newFileSystem(config).getPath("/tmp") // we forced Unix, so /tmp is fine
Files.createDirectory(dir)

val fileName = "file.js"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class MainGenericRunner {
val linker = StandardImpl.linker(linkerConfig)

val sjsCode = {
val dir = Jimfs.newFileSystem().getPath("/tmp")
val dir = Jimfs.newFileSystem().getPath("tmp").toAbsolutePath()
Files.createDirectory(dir)

val cache = StandardImpl.irFileCache().newCache
Expand Down

0 comments on commit 88a19cf

Please sign in to comment.