Merge "Fix unit tests on i386 and other archs"
This commit is contained in:
commit
1f36582efb
@ -53,6 +53,7 @@ from functools import partial
|
|||||||
from tempfile import TemporaryFile, NamedTemporaryFile, mkdtemp
|
from tempfile import TemporaryFile, NamedTemporaryFile, mkdtemp
|
||||||
from netifaces import AF_INET6
|
from netifaces import AF_INET6
|
||||||
from mock import MagicMock, patch
|
from mock import MagicMock, patch
|
||||||
|
from nose import SkipTest
|
||||||
from six.moves.configparser import NoSectionError, NoOptionError
|
from six.moves.configparser import NoSectionError, NoOptionError
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
@ -3612,6 +3613,12 @@ cluster_dfw1 = http://dfw1.host/v1/
|
|||||||
def _fake_syscall(*args):
|
def _fake_syscall(*args):
|
||||||
called['syscall'] = args
|
called['syscall'] = args
|
||||||
|
|
||||||
|
# Test if current architecture supports changing of priority
|
||||||
|
try:
|
||||||
|
utils.NR_ioprio_set()
|
||||||
|
except OSError as e:
|
||||||
|
raise SkipTest(e)
|
||||||
|
|
||||||
with patch('swift.common.utils._libc_setpriority',
|
with patch('swift.common.utils._libc_setpriority',
|
||||||
_fake_setpriority), \
|
_fake_setpriority), \
|
||||||
patch('swift.common.utils._posix_syscall', _fake_syscall):
|
patch('swift.common.utils._posix_syscall', _fake_syscall):
|
||||||
|
Loading…
Reference in New Issue
Block a user