fuse: flag to run specific tests.

Change-Id: I53f156619ef6381f70f0af741b63b85281c71239
This commit is contained in:
Brad Fitzpatrick 2012-03-14 10:49:52 -07:00
parent d20e0504f0
commit 7f722b4cd9
1 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,7 @@
package fuse
import (
"flag"
"fmt"
"io/ioutil"
"log"
@ -15,6 +16,8 @@ import (
"time"
)
var fuseRun = flag.String("fuserun", "", "which fuse test to run. runs all if empty.")
// umount tries its best to unmount dir.
func umount(dir string) {
err := exec.Command("umount", dir).Run()
@ -53,8 +56,10 @@ func TestFuse(t *testing.T) {
}
for _, tt := range fuseTests {
t.Logf("running %T", tt.node)
tt.node.test(dir+"/"+tt.name, t)
if *fuseRun == "" || *fuseRun == tt.name {
t.Logf("running %T", tt.node)
tt.node.test(dir+"/"+tt.name, t)
}
}
}