Skip to content

Commit

Permalink
Update release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
bootstraponline committed Nov 16, 2018
1 parent 3dd27d4 commit 6a96663
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## v4.1
- ?
## v4.1 (unreleased)
- `app`, `test`, and `xctestrun-file` now support `~`, environment variables, and globs (`*`, `**`) when resolving paths. #386

## v4.0.0

Expand Down
8 changes: 2 additions & 6 deletions test_runner/src/main/kotlin/ftl/args/ArgsFileVisitor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,11 @@ class ArgsFileVisitor(glob: String) : SimpleFileVisitor<Path>() {
fun walk(searchPath: Path): List<Path> {
val searchString = searchPath.toString()
// /Users/tmp/code/flank/test_app/** => /Users/tmp/code/flank/test_app/
// /Users/tmp/code/* => /Users/tmp/code/
val beforeGlob = Paths.get(searchString.substringBefore(SINGLE_GLOB))
// must not follow links when resolving paths or /tmp turns into /private/tmp
val realPath = beforeGlob.toRealPath(LinkOption.NOFOLLOW_LINKS)

val searchDepth = if (searchString.contains(RECURSE)) {
Integer.MAX_VALUE
} else {
1
}
val searchDepth = if (searchString.contains(RECURSE)) Integer.MAX_VALUE else 1

Files.walkFileTree(realPath, EnumSet.of(FileVisitOption.FOLLOW_LINKS), searchDepth, this)
return this.result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import org.junit.contrib.java.lang.system.SystemErrRule
import org.junit.contrib.java.lang.system.SystemOutRule
import org.junit.rules.ExpectedException
import org.junit.runner.RunWith
import java.io.File
import ftl.test.util.TestHelper.absolutePath

@RunWith(FlankTestRunner::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class ArgsHelperFilePathTest {
Truth.assertThat(actual).isEqualTo(expected)
}


@Test(expected = RuntimeException::class)
fun wildCardsInFileNameWithMultipleMatches() {
makeTmpFile("/tmp/tmp1/app-debug.apk")
Expand All @@ -106,7 +105,6 @@ class ArgsHelperFilePathTest {
ArgsHelper.evaluateFilePath(inputPath)
}


@Test(expected = RuntimeException::class)
fun wildCardsInFilePathWithMultipleMatches() {
makeTmpFile("/tmp/tmp1/tmp2/tmp3/app-debug.apk")
Expand Down

0 comments on commit 6a96663

Please sign in to comment.