Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reverse tests on OSX, improve install documentation #51

Merged
merged 6 commits into from
Jan 18, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
tests: Use portable_unmount in reverse tests
Fixes unmount failure on OSX
  • Loading branch information
rfjakob committed Jan 11, 2015
commit b05872d85d8350eade04f1d593c9c3fefdd39ee9
13 changes: 13 additions & 0 deletions tests/common.pl
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Portable FUSE unmount
# works on Linux AND OSX
sub portable_unmount {
my $crypt = shift;
my $fusermount = qx(which fusermount);
chomp($fusermount);
if(-f $fusermount) {
qx($fusermount -u "$crypt");
} else {
qx(umount "$crypt");
}
}

# Helper function
# Get the MD5 sum of the file open at the filehandle
use Digest::MD5 qw(md5_hex);
Expand Down
10 changes: 1 addition & 9 deletions tests/normal.t.pl
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,7 @@ sub mount
# Unmount and delete mountpoint
sub cleanup
{
my $fusermount = qx(which fusermount);
chomp($fusermount);
if(-f $fusermount)
{
qx($fusermount -u "$crypt");
} else
{
qx(umount "$crypt");
}
portable_unmount($crypt);

rmdir $crypt;
ok( ! -d $crypt, "unmount ok, mount point removed");
Expand Down
4 changes: 2 additions & 2 deletions tests/reverse.t.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ sub newWorkingDir
# Unmount and delete mountpoint
sub cleanup
{
system("fusermount -u $decrypted");
system("fusermount -u $ciphertext");
portable_unmount($decrypted);
portable_unmount($ciphertext);
our $workingDir;
rmtree($workingDir);
ok( ! -d $workingDir, "working dir removed");
Expand Down