Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ target/
.sbtserver
.scala-build/
.bsp/
.bloop
.metals
project/.sbtserver
tags
nohup.out
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.watcherExclude": {
"**/target": true
}
}
20 changes: 18 additions & 2 deletions os/test/src/TestUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ object TestUtil {
str1Normalized == str2Normalized
}

def prep[T](f: os.Path => T)(implicit tp: TestPath, fn: sourcecode.FullName) = {
/** Creates a temporary directory for the current test. */
def mkDir[T](f: os.Path => T)(implicit tp: TestPath, fn: sourcecode.FullName) = {
val segments = Seq("out", "scratch") ++ fn.value.split('.').drop(2) ++ tp.value

val directory = Paths.get(segments.mkString("/"))
Expand All @@ -58,6 +59,15 @@ object TestUtil {
}
)

val wd = os.Path(directory.toAbsolutePath)
os.makeDir.all.apply(wd)
f(wd)
}

/** Populates the directory with test resources. */
def populate[T](directory: Path)(implicit tp: TestPath, fn: sourcecode.FullName): Unit = {
if (os.exists(os.Path(directory))) os.remove.all(os.Path(directory))

val original = Paths.get(sys.env("OS_TEST_RESOURCE_FOLDER"), "test")
Files.walkFileTree(
original,
Expand All @@ -73,8 +83,14 @@ object TestUtil {
}
}
)
}

f(os.Path(directory.toAbsolutePath))
/** Creates a temporary directory for the current test and populates it with test resources. */
def prep[T](f: os.Path => T)(implicit tp: TestPath, fn: sourcecode.FullName) = {
mkDir { wd =>
populate(wd.toNIO)
f(wd)
}
}

def prepChecker[T](f: os.Path => T)(implicit tp: TestPath, fn: sourcecode.FullName): T =
Expand Down
104 changes: 0 additions & 104 deletions os/watch/src/CarbonApi.scala

This file was deleted.

110 changes: 0 additions & 110 deletions os/watch/src/FSEventsWatcher.scala

This file was deleted.

Loading
Loading