From 7f722b4cd9ecaf87181ae87aab7e23a8d180aba5 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 14 Mar 2012 10:49:52 -0700 Subject: [PATCH] fuse: flag to run specific tests. Change-Id: I53f156619ef6381f70f0af741b63b85281c71239 --- third_party/code.google.com/p/rsc/fuse/fuse_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/third_party/code.google.com/p/rsc/fuse/fuse_test.go b/third_party/code.google.com/p/rsc/fuse/fuse_test.go index b2e25b9ac..bec896fe1 100644 --- a/third_party/code.google.com/p/rsc/fuse/fuse_test.go +++ b/third_party/code.google.com/p/rsc/fuse/fuse_test.go @@ -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) + } } }