mirror of
https://github.com/vgough/encfs.git
synced 2024-11-22 07:53:31 +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-4.0
|
||||||
- clang-tidy-4.0
|
- clang-tidy-4.0
|
||||||
env:
|
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
|
- os: osx
|
||||||
compiler: clang
|
compiler: clang
|
||||||
osx_image: xcode8.3
|
osx_image: xcode8.3
|
||||||
sudo: true
|
sudo: true
|
||||||
env:
|
env:
|
||||||
- INTEGRATION=true SUDO_MOUNT=sudo
|
- INTEGRATION=true SUDO_TESTS=true
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- ./ci/setup.sh
|
- ./ci/setup.sh
|
||||||
|
@ -443,8 +443,8 @@ sub checkReadError
|
|||||||
# Test that write errors are correctly thrown up to us
|
# Test that write errors are correctly thrown up to us
|
||||||
sub checkWriteError
|
sub checkWriteError
|
||||||
{
|
{
|
||||||
# Not sure how to implement this on Mac OS, so feel free !
|
# No OSX impl, and requires sudo which is inconvenient outside of CI.
|
||||||
if($^O eq "darwin") {
|
if($^O eq "darwin" || !defined($ENV{'SUDO_TESTS'})) {
|
||||||
ok(1, "write error");
|
ok(1, "write error");
|
||||||
ok(1, "write error");
|
ok(1, "write error");
|
||||||
ok(1, "write error");
|
ok(1, "write error");
|
||||||
@ -455,7 +455,7 @@ sub checkWriteError
|
|||||||
my $mnt = "$workingDir/checkWriteError.mnt";
|
my $mnt = "$workingDir/checkWriteError.mnt";
|
||||||
mkdir($crypt) || BAIL_OUT($!);
|
mkdir($crypt) || BAIL_OUT($!);
|
||||||
mkdir($mnt) || 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;
|
ok( $? == 0, "mount command returns 0") || return;
|
||||||
system("./build/encfs --standard --extpass=\"echo test\" $crypt $mnt 2>&1");
|
system("./build/encfs --standard --extpass=\"echo test\" $crypt $mnt 2>&1");
|
||||||
ok( $? == 0, "encfs command returns 0") || return;
|
ok( $? == 0, "encfs command returns 0") || return;
|
||||||
@ -464,6 +464,6 @@ sub checkWriteError
|
|||||||
ok ($!{ENOSPC}, "write returned $! instead of ENOSPC");
|
ok ($!{ENOSPC}, "write returned $! instead of ENOSPC");
|
||||||
close OUT;
|
close OUT;
|
||||||
portable_unmount($mnt);
|
portable_unmount($mnt);
|
||||||
system(($ENV{'SUDO_MOUNT'}||"")." umount $crypt");
|
system("sudo umount $crypt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user