diff options
author | Jakob Unterwurzacher | 2016-06-23 21:29:00 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-06-23 21:38:59 +0200 |
commit | b17f0465c7c38cab2f1f4ad0fc25d64d5cd175e7 (patch) | |
tree | c898e5a535f0f9c0f8fcd8c58a01ac78ac550298 /tests/test_helpers/helpers.go | |
parent | 8a2e1a543aa793bf234838b8ba03b28c43f802a8 (diff) |
Drop deprecated "-diriv" option
The DirIV feature flag is already mandatory, dropping the command
line option is the final step.
Diffstat (limited to 'tests/test_helpers/helpers.go')
-rw-r--r-- | tests/test_helpers/helpers.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test_helpers/helpers.go b/tests/test_helpers/helpers.go index a3258fb..655df05 100644 --- a/tests/test_helpers/helpers.go +++ b/tests/test_helpers/helpers.go @@ -91,7 +91,7 @@ func InitFS(t *testing.T, extraArgs ...string) string { // Mount CIPHERDIR "c" on PLAINDIR "p" // Creates "p" if it does not exist. -func Mount(c string, p string, extraArgs ...string) error { +func Mount(c string, p string, showOutput bool, extraArgs ...string) error { var args []string args = append(args, extraArgs...) args = append(args, "-nosyslog", "-q", "-wpanic") @@ -108,15 +108,17 @@ func Mount(c string, p string, extraArgs ...string) error { } cmd := exec.Command(GocryptfsBinary, args...) - cmd.Stderr = os.Stderr - cmd.Stdout = os.Stdout + if showOutput { + cmd.Stderr = os.Stderr + cmd.Stdout = os.Stdout + } return cmd.Run() } // MountOrExit calls mount() and exits on failure. func MountOrExit(c string, p string, extraArgs ...string) { - err := Mount(c, p, extraArgs...) + err := Mount(c, p, true, extraArgs...) if err != nil { fmt.Printf("mount failed: %v", err) os.Exit(1) @@ -125,7 +127,7 @@ func MountOrExit(c string, p string, extraArgs ...string) { // MountOrFatal calls mount() and calls t.Fatal() on failure. func MountOrFatal(t *testing.T, c string, p string, extraArgs ...string) { - err := Mount(c, p, extraArgs...) + err := Mount(c, p, true, extraArgs...) if err != nil { t.Fatal(fmt.Errorf("mount failed: %v", err)) } |