mirror of https://github.com/perkeep/perkeep.git
fuse: flag to run specific tests.
Change-Id: I53f156619ef6381f70f0af741b63b85281c71239
This commit is contained in:
parent
d20e0504f0
commit
7f722b4cd9
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue