Skip to content

Commit 68f13c3

Browse files
committed
Fix issue where specifying specific test to run failed to run it.
It was because filepath.Split left a trailing slash after dir, so "fixedbugs/" != "fixedbugs". Use filepath.Clean on input t.dir to resolve this. Remove another completed TODO.
1 parent f95bdcb commit 68f13c3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tests/run.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,6 @@ func main() {
217217
}
218218
} else {
219219
for _, dir := range dirs {
220-
// GOPHERJS.
221-
// TODO: Make this work so test filter doesn't break, etc.
222-
//dir = filepath.Join(runtime.GOROOT(), "test", dir)
223-
224220
for _, baseGoFile := range goFiles(dir) {
225221
tests = append(tests, startTest(dir, baseGoFile))
226222
}
@@ -596,7 +592,7 @@ func (t *test) run() {
596592
// GOPHERJS: For now, only run with "run", "cmpout" actions, in "fixedbugs" dir.
597593
switch action {
598594
case "run", "cmpout":
599-
if t.dir != "fixedbugs" {
595+
if filepath.Clean(t.dir) != "fixedbugs" {
600596
action = "skip"
601597
}
602598
case "rundircmpout", "compile", "compiledir", "build", "runoutput",

0 commit comments

Comments
 (0)