mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 15:33:16 +01:00
skip sudo tests by default unless in CI
This commit is contained in:
parent
72e21f3c09
commit
e2e1fadfa9
@ -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
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user