mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Making tests runnable on OSX
This commit is contained in:
parent
7d5441e294
commit
6d52cab067
@ -1,3 +1,14 @@
|
||||
Running The Tests
|
||||
=================
|
||||
|
||||
To run the tests, use ``tests/runtests.py``, see ``--help`` for more info.
|
||||
|
||||
Examples:
|
||||
To run all tests: ``sudo ./tests/runtests.py``
|
||||
Run unit tests only: ``sudo ./tests/runtests.py --unit-tests``
|
||||
|
||||
You will need 'mock' (https://pypi.python.org/pypi/mock) in addition to salt requirements in order to run the tests.
|
||||
|
||||
=============
|
||||
Writing Tests
|
||||
=============
|
||||
|
@ -228,6 +228,10 @@ class Master(SMaster):
|
||||
def __set_max_open_files(self):
|
||||
# Let's check to see how our max open files(ulimit -n) setting is
|
||||
mof_s, mof_h = resource.getrlimit(resource.RLIMIT_NOFILE)
|
||||
if mof_h == resource.RLIM_INFINITY:
|
||||
# Unclear what to do with infinity... OSX reports RLIM_INFINITY as hard limit,
|
||||
# but raising to anything above soft limit fails...
|
||||
mof_h = mof_s
|
||||
log.info(
|
||||
'Current values for max open files soft/hard setting: '
|
||||
'{0}/{1}'.format(
|
||||
|
Loading…
Reference in New Issue
Block a user