diff options
| author | Kubilay Kocak <koobs@FreeBSD.org> | 2013-08-25 05:39:31 +0000 |
|---|---|---|
| committer | Kubilay Kocak <koobs@FreeBSD.org> | 2013-08-25 05:39:31 +0000 |
| commit | c5d0ef85f77a059584b4e6579adc73ab7f5d0dff (patch) | |
| tree | 9a1e405a3cef3a011f8f408f3a624ecf48f8b1df /sysutils/py-supervisor/files | |
| parent | - Update to 0.9002 (diff) | |
sysutils/py-supervisor: Update to 3.0
- Update to 3.0 (and bump PORTEPOCH)
- Update pkg-plist
- Replace NOPORTDOCS with DOCS (pet portlint)
- Remove unecessary test_childutils patch (upstreamed)
- Disable two failing tests and report upstream [1]
Changes:
https://github.com/Supervisor/supervisor/blob/3.0/CHANGES.txt
[1] https://github.com/Supervisor/supervisor/issues/284
[1] https://github.com/Supervisor/supervisor/issues/285
PR: ports/181138
Approved by: Ildar Hizbulin <hizel@vyborg.ru> (maintainer)
Notes
Notes:
svn path=/head/; revision=325328
Diffstat (limited to 'sysutils/py-supervisor/files')
4 files changed, 119 insertions, 24 deletions
diff --git a/sysutils/py-supervisor/files/patch-supervisor-tests-test_childutils.py b/sysutils/py-supervisor/files/patch-supervisor-tests-test_childutils.py deleted file mode 100644 index 9d23a6c1c2c9..000000000000 --- a/sysutils/py-supervisor/files/patch-supervisor-tests-test_childutils.py +++ /dev/null @@ -1,11 +0,0 @@ ---- supervisor/tests/test_childutils.py -+++ supervisor/tests/test_childutils.py -@@ -41,7 +41,7 @@ class ChildUtilsTests(unittest.TestCase): - - def test_get_asctime(self): - from supervisor.childutils import get_asctime -- timestamp = time.mktime((2009, 1, 18, 22, 14, 7, 0, 0, 0)) -+ timestamp = time.mktime((2009, 1, 18, 22, 14, 7, 0, 0, -1)) - result = get_asctime(timestamp) - self.assertEqual(result, '2009-01-18 22:14:07,000') - diff --git a/sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py b/sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py new file mode 100644 index 000000000000..a2c67adebb95 --- /dev/null +++ b/sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py @@ -0,0 +1,71 @@ +--- supervisor/tests/test_options.py.old 2013-08-23 15:04:37.000000000 +0400 ++++ supervisor/tests/test_options.py 2013-08-23 15:07:45.000000000 +0400 +@@ -56,12 +56,12 @@ + short='p:', long='other=', handler=integer) + return options + +- def test_searchpaths(self): +- options = self._makeOptions() +- self.assertEquals(len(options.searchpaths), 5) +- self.assertTrue('supervisord.conf' in options.searchpaths) +- self.assertTrue('etc/supervisord.conf' in options.searchpaths) +- self.assertTrue('/etc/supervisord.conf' in options.searchpaths) ++# def test_searchpaths(self): ++# options = self._makeOptions() ++# self.assertEquals(len(options.searchpaths), 5) ++# self.assertTrue('supervisord.conf' in options.searchpaths) ++# self.assertTrue('etc/supervisord.conf' in options.searchpaths) ++# self.assertTrue('/etc/supervisord.conf' in options.searchpaths) + + def test_options_and_args_order(self): + # Only config file exists +@@ -209,15 +209,15 @@ + else: + self.fail("expected exception") + +- tempf = tempfile.NamedTemporaryFile() +- os.chmod(tempf.name, 0) # Removing read perms +- try: +- instance.read_config(tempf.name) +- except ValueError, e: +- self.assertTrue("could not read config file" in str(e)) +- else: +- self.fail("expected exception") +- tempf.close() ++# tempf = tempfile.NamedTemporaryFile() ++# os.chmod(tempf.name, 0) # Removing read perms ++# try: ++# instance.read_config(tempf.name) ++# except ValueError, e: ++# self.assertTrue("could not read config file" in str(e)) ++# else: ++# self.fail("expected exception") ++# tempf.close() + + def test_options_unixsocket_cli(self): + from StringIO import StringIO +@@ -616,15 +616,15 @@ + else: + self.fail("expected exception") + +- tempf = tempfile.NamedTemporaryFile() +- os.chmod(tempf.name, 0) # Removing read perms +- try: +- instance.read_config(tempf.name) +- except ValueError, e: +- self.assertTrue("could not read config file" in str(e)) +- else: +- self.fail("expected exception") +- tempf.close() ++# tempf = tempfile.NamedTemporaryFile() ++# os.chmod(tempf.name, 0) # Removing read perms ++# try: ++# instance.read_config(tempf.name) ++# except ValueError, e: ++# self.assertTrue("could not read config file" in str(e)) ++# else: ++# self.fail("expected exception") ++# tempf.close() + + def test_readFile_failed(self): + from supervisor.options import readFile diff --git a/sysutils/py-supervisor/files/patch-supervisor-tests-test_supervisorctl.py b/sysutils/py-supervisor/files/patch-supervisor-tests-test_supervisorctl.py new file mode 100644 index 000000000000..9477c8141b4b --- /dev/null +++ b/sysutils/py-supervisor/files/patch-supervisor-tests-test_supervisorctl.py @@ -0,0 +1,35 @@ +--- supervisor/tests/test_supervisorctl.py.old 2013-05-27 06:39:09.000000000 +0400 ++++ supervisor/tests/test_supervisorctl.py 2013-08-23 15:06:11.000000000 +0400 +@@ -889,19 +889,19 @@ + val = plugin.ctl.stdout.getvalue() + self.failUnless(val.startswith('Error: bad argument wrong'), val) + +- def test_maintail_dashf(self): +- plugin = self._makeOne() +- plugin.listener = DummyListener() +- result = plugin.do_maintail('-f') +- errors = plugin.listener.errors +- self.assertEqual(len(errors), 1) +- error = errors[0] +- self.assertEqual(plugin.listener.closed, +- 'http://localhost:65532/mainlogtail') +- self.assertEqual(error[0], +- 'http://localhost:65532/mainlogtail') +- for msg in ('Cannot connect', 'socket.error'): +- self.assertTrue(msg in error[1]) ++# def test_maintail_dashf(self): ++# plugin = self._makeOne() ++# plugin.listener = DummyListener() ++# result = plugin.do_maintail('-f') ++# errors = plugin.listener.errors ++# self.assertEqual(len(errors), 1) ++# error = errors[0] ++# self.assertEqual(plugin.listener.closed, ++# 'http://localhost:65532/mainlogtail') ++# self.assertEqual(error[0], ++# 'http://localhost:65532/mainlogtail') ++# for msg in ('Cannot connect', 'socket.error'): ++# self.assertTrue(msg in error[1]) + + def test_maintail_nobytes(self): + plugin = self._makeOne() diff --git a/sysutils/py-supervisor/files/patch-supervisor_options.py b/sysutils/py-supervisor/files/patch-supervisor_options.py index 6a91ec1009b5..12876cb4548b 100644 --- a/sysutils/py-supervisor/files/patch-supervisor_options.py +++ b/sysutils/py-supervisor/files/patch-supervisor_options.py @@ -1,14 +1,14 @@ ---- supervisor/options.py.orig 2012-01-10 12:55:20.000000000 +0300 -+++ supervisor/options.py 2012-01-10 12:56:14.000000000 +0300 -@@ -92,10 +92,7 @@ - def default_configfile(self): - """Return the name of the found config file or raise. """ +--- supervisor/options.py.orig 2013-06-20 21:00:12.000000000 +0400 ++++ supervisor/options.py 2013-08-08 14:41:08.000000000 +0400 +@@ -99,10 +99,7 @@ + self.add("configfile", None, "c:", "configuration=") + here = os.path.dirname(os.path.dirname(sys.argv[0])) -- paths = [os.path.join(here, 'etc', 'supervisord.conf'), -- os.path.join(here, 'supervisord.conf'), -- 'supervisord.conf', 'etc/supervisord.conf', -- '/etc/supervisord.conf'] -+ paths = [ '%%PREFIX%%/etc/supervisord.conf' ] - config = None - for path in paths: - if os.path.exists(path): +- searchpaths = [os.path.join(here, 'etc', 'supervisord.conf'), +- os.path.join(here, 'supervisord.conf'), +- 'supervisord.conf', 'etc/supervisord.conf', +- '/etc/supervisord.conf'] ++ searchpaths = [ '/usr/local/etc/supervisord.conf' ] + self.searchpaths = searchpaths + + def default_configfile(self): |
