diff --git a/.travis.yml b/.travis.yml index 955c119..8c587a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,14 +37,14 @@ matrix: - clang-4.0 - clang-tidy-4.0 env: - - CC=clang-4.0 CXX=clang++-4.0 CHECK=true INTEGRATION=true SUDO_MOUNT=sudo + - CC=clang-4.0 CXX=clang++-4.0 CHECK=true INTEGRATION=true SUDO_TESTS=true - os: osx compiler: clang osx_image: xcode8.3 sudo: true env: - - INTEGRATION=true SUDO_MOUNT=sudo + - INTEGRATION=true SUDO_TESTS=true before_script: - ./ci/setup.sh diff --git a/integration/normal.t.pl b/integration/normal.t.pl index f47a380..840d32c 100755 --- a/integration/normal.t.pl +++ b/integration/normal.t.pl @@ -443,8 +443,8 @@ sub checkReadError # Test that write errors are correctly thrown up to us sub checkWriteError { - # Not sure how to implement this on Mac OS, so feel free ! - if($^O eq "darwin") { + # No OSX impl, and requires sudo which is inconvenient outside of CI. + if($^O eq "darwin" || !defined($ENV{'SUDO_TESTS'})) { ok(1, "write error"); ok(1, "write error"); ok(1, "write error"); @@ -455,7 +455,7 @@ sub checkWriteError my $mnt = "$workingDir/checkWriteError.mnt"; mkdir($crypt) || BAIL_OUT($!); mkdir($mnt) || BAIL_OUT($!); - system(($ENV{'SUDO_MOUNT'}||"")." mount -t tmpfs -o size=1m tmpfs $crypt"); + system("sudo mount -t tmpfs -o size=1m tmpfs $crypt"); ok( $? == 0, "mount command returns 0") || return; system("./build/encfs --standard --extpass=\"echo test\" $crypt $mnt 2>&1"); ok( $? == 0, "encfs command returns 0") || return; @@ -464,6 +464,6 @@ sub checkWriteError ok ($!{ENOSPC}, "write returned $! instead of ENOSPC"); close OUT; portable_unmount($mnt); - system(($ENV{'SUDO_MOUNT'}||"")." umount $crypt"); + system("sudo umount $crypt"); } }