tests: add verbose output when unmounting

This commit is contained in:
Jakob Unterwurzacher 2016-07-11 20:40:53 +02:00
parent 1c54fcd04b
commit df17f1d702
2 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,7 @@ func TestMain(m *testing.M) {
flag.Parse()
for _, opensslOpt = range []string{"-openssl=false", "-openssl=true"} {
if testing.Verbose() {
fmt.Printf("TestMain: testing with %q\n", opensslOpt)
fmt.Printf("example_filesystems: testing with %q\n", opensslOpt)
}
test_helpers.ResetTmpDir(true)
r := m.Run()

View File

@ -49,6 +49,9 @@ func ResetTmpDir(plaintextNames bool) {
d := filepath.Join(TmpDir, e.Name())
err = os.Remove(d)
if err != nil {
if testing.Verbose() {
fmt.Printf("%v, trying umount\n", d, err)
}
UnmountErr(d)
err = os.RemoveAll(d)
if err != nil {