forked from third-party-mirrors/zfs_autobackup
some fixes to run tests from pycharm with a suid-python binary
This commit is contained in:
parent
c52857f7b9
commit
a2f4dd4227
@ -1,4 +1,4 @@
|
|||||||
|
import os
|
||||||
# To run tests as non-root, use this hack:
|
# To run tests as non-root, use this hack:
|
||||||
# chmod 4755 /usr/sbin/zpool /usr/sbin/zfs
|
# chmod 4755 /usr/sbin/zpool /usr/sbin/zfs
|
||||||
|
|
||||||
@ -51,6 +51,10 @@ if sys.version_info.major==2:
|
|||||||
else:
|
else:
|
||||||
OutputIO=io.StringIO
|
OutputIO=io.StringIO
|
||||||
|
|
||||||
|
# for when we're using a suid-root python binary during development
|
||||||
|
os.setuid(0)
|
||||||
|
os.setgid(0)
|
||||||
|
|
||||||
|
|
||||||
# for python2 compatibility (python 3 has this already)
|
# for python2 compatibility (python 3 has this already)
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
|
1
tests/tests
Symbolic link
1
tests/tests
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
.
|
Loading…
x
Reference in New Issue
Block a user