Commit e74d8b6a authored by Aaron Jacobs's avatar Aaron Jacobs

Added a --debug flag.

parent db0ab82b
......@@ -35,6 +35,8 @@ var fToolPath = flag.String(
"",
"Path to the mount_sample tool. If unset, we will compile it.")
var fDebug = flag.Bool("debug", false, "If true, print fuse debug info.")
// A struct that implements common behavior needed by tests in the samples/
// directory where the file system is mounted by a subprocess. Use it as an
// embedded field in your test fixture, calling its SetUp method from your
......@@ -273,7 +275,13 @@ func (t *SubprocessTest) initialize() (err error) {
mountCmd.Stderr = &stderr
mountCmd.ExtraFiles = extraFiles
// Start it.
// Handle debug mode.
if *fDebug {
mountCmd.Stderr = os.Stderr
mountCmd.Args = append(mountCmd.Args, "--fuse.debug")
}
// Start the command.
if err = mountCmd.Start(); err != nil {
err = fmt.Errorf("mountCmd.Start: %v", err)
return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment