On Thu 15/02/2018 12:43, Rafael Sadowski wrote: > On Tue Feb 13, 2018 at 07:28:54PM +0100, Björn Ketelaars wrote: > > git-cola received an update, which fixes some bugs and adds some > > features. Changelog can be found at > > https://github.com/git-cola/git-cola/blob/master/share/doc/git-cola/relnotes.rst > > > > Lightly tested on my laptop. > > > > OK? > > Looks good but test section needs love or NO_TEST=Yes
Yes...test section needed some love. Output 'make test': Ran 137 tests in 12.860s OK? Index: Makefile =================================================================== RCS file: /cvs/ports/devel/git-cola/Makefile,v retrieving revision 1.20 diff -u -p -r1.20 Makefile --- Makefile 28 May 2017 08:27:35 -0000 1.20 +++ Makefile 16 Feb 2018 12:17:13 -0000 @@ -2,7 +2,7 @@ COMMENT = python powered git gui -MODPY_EGG_VERSION= 2.11 +MODPY_EGG_VERSION= 3.0 DISTNAME = ${GH_PROJECT}-${MODPY_EGG_VERSION} GH_ACCOUNT = git-cola @@ -11,7 +11,7 @@ GH_TAGNAME = v${MODPY_EGG_VERSION} CATEGORIES = devel x11 -HOMEPAGE = http://cola.tuxfamily.org/ +HOMEPAGE = https://git-cola.github.io/ # GPLv2 only PERMIT_PACKAGE_CDROM= Yes @@ -28,14 +28,16 @@ RUN_DEPENDS = devel/desktop-file-utils \ textproc/xxdiff \ x11/py-qt4 +TEST_DEPENDS = devel/py-mock \ + devel/py-nose + MODPY_ADJ_FILES= share/git-cola/bin/git-xbase pre-configure: ${SUBST_CMD} ${WRKSRC}/cola/app.py -pre-test: - ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python - # needs an X server - rm -f ${WRKSRC}/test/qtutils_test.py +do-test: + ${SUBST_CMD} ${WRKSRC}/test/git_test.py + cd ${WRKSRC} && nosetests --exclude=sphinxtogithub --verbose .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/devel/git-cola/distinfo,v retrieving revision 1.7 diff -u -p -r1.7 distinfo --- distinfo 28 May 2017 08:27:35 -0000 1.7 +++ distinfo 16 Feb 2018 12:17:13 -0000 @@ -1,2 +1,2 @@ -SHA256 (git-cola-2.11.tar.gz) = vEAH4NnIB2PvWNYwsDO/29hAavd7vSkqbGR+08plW1s= -SIZE (git-cola-2.11.tar.gz) = 1179769 +SHA256 (git-cola-3.0.tar.gz) = YZWPmY1GGOCc4N1HNBGSGBjRPfg48yEC713tmEoNGlA= +SIZE (git-cola-3.0.tar.gz) = 1218820 Index: patches/patch-Makefile =================================================================== RCS file: /cvs/ports/devel/git-cola/patches/patch-Makefile,v retrieving revision 1.2 diff -u -p -r1.2 patch-Makefile --- patches/patch-Makefile 8 Nov 2015 19:33:06 -0000 1.2 +++ patches/patch-Makefile 16 Feb 2018 12:17:13 -0000 @@ -2,9 +2,10 @@ $OpenBSD: patch-Makefile,v 1.2 2015/11/0 Avoid dep on gnu make ---- Makefile.orig Mon Oct 12 21:03:45 2015 -+++ Makefile Sun Nov 8 20:17:51 2015 -@@ -44,11 +44,7 @@ setup_args += --force +Index: Makefile +--- Makefile.orig ++++ Makefile +@@ -59,11 +59,7 @@ setup_args += --force setup_args += --install-scripts=$(bindir) setup_args += --record=build/MANIFEST setup_args += --install-lib=$(coladir) @@ -15,5 +16,5 @@ Avoid dep on gnu make -export prefix +setup_args += --root=$(DESTDIR) - PYTHON_DIRS = test - PYTHON_DIRS += cola + # If NO_VENDOR_LIBS is specified on the command line then pass it to setup.py + ifdef NO_VENDOR_LIBS Index: patches/patch-cola_app_py =================================================================== RCS file: /cvs/ports/devel/git-cola/patches/patch-cola_app_py,v retrieving revision 1.2 diff -u -p -r1.2 patch-cola_app_py --- patches/patch-cola_app_py 8 Nov 2015 19:33:06 -0000 1.2 +++ patches/patch-cola_app_py 16 Feb 2018 12:17:13 -0000 @@ -2,9 +2,10 @@ $OpenBSD: patch-cola_app_py,v 1.2 2015/1 Use ssh-askpass implementation from xenocara. ---- cola/app.py.orig Mon Oct 12 21:03:45 2015 -+++ cola/app.py Sun Nov 8 20:17:51 2015 -@@ -118,7 +118,7 @@ def setup_environment(): +Index: cola/app.py +--- cola/app.py.orig ++++ cola/app.py +@@ -81,7 +81,7 @@ def setup_environment(): elif sys.platform == 'darwin': askpass = resources.share('bin', 'ssh-askpass-darwin') else: Index: patches/patch-test_git_test_py =================================================================== RCS file: patches/patch-test_git_test_py diff -N patches/patch-test_git_test_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-test_git_test_py 16 Feb 2018 12:17:13 -0000 @@ -0,0 +1,63 @@ +$OpenBSD$ + +test_tag and test_show assume that source has been fetched using git, and that +full history is availabe. These tests fail as we are using a release tarball. + +Index: test/git_test.py +--- test/git_test.py.orig ++++ test/git_test.py +@@ -219,26 +219,13 @@ class GitCommandTest(unittest.TestCase): + version = self.git.version()[STDOUT] + self.failUnless(version.startswith('git version')) + +- def test_tag(self): +- """Test running 'git tag'""" +- tags = self.git.tag()[STDOUT].splitlines() +- if os.getenv('GIT_COLA_NO_HISTORY', False): +- return +- self.failUnless('v1.0.0' in tags) +- +- def test_show(self): +- """Test running 'git show'""" +- oid = 'HEAD' +- content = self.git.show(oid)[STDOUT] +- self.failUnless(content.startswith('commit ')) +- + def test_stdout(self): + """Test overflowing the stdout buffer""" + # Write to stdout only + code = ('import sys;' + 's = "\\0" * (1024 * 16 + 1);' + 'sys.stdout.write(s);') +- status, out, err = git.Git.execute(['python', '-c', code], _raw=True) ++ status, out, err = git.Git.execute(['${MODPY_BIN}', '-c', code], _raw=True) + self.assertEqual(status, 0) + self.assertEqual(len(out), 1024 * 16 + 1) + self.assertEqual(len(err), 0) +@@ -249,7 +236,7 @@ class GitCommandTest(unittest.TestCase): + code = ('import sys;' + 's = "\\0" * (1024 * 16 + 1);' + 'sys.stderr.write(s);') +- status, out, err = git.Git.execute(['python', '-c', code], _raw=True) ++ status, out, err = git.Git.execute(['${MODPY_BIN}', '-c', code], _raw=True) + self.assertEqual(status, 0) + self.assertEqual(len(out), 0) + self.assertEqual(len(err), 1024 * 16 + 1) +@@ -261,7 +248,7 @@ class GitCommandTest(unittest.TestCase): + 's = "\\0" * (1024 * 16 + 1);' + 'sys.stdout.write(s);' + 'sys.stderr.write(s);') +- status, out, err = git.Git.execute(['python', '-c', code], _raw=True) ++ status, out, err = git.Git.execute(['${MODPY_BIN}', '-c', code], _raw=True) + self.assertEqual(status, 0) + self.assertEqual(len(out), 1024 * 16 + 1) + self.assertEqual(len(err), 1024 * 16 + 1) +@@ -273,7 +260,7 @@ class GitCommandTest(unittest.TestCase): + 's = "\\0" * (1024 * 16 + 1);' + 'sys.stderr.write(s);' + 'sys.stdout.write(s);') +- status, out, err = git.Git.execute(['python', '-c', code], _raw=True) ++ status, out, err = git.Git.execute(['${MODPY_BIN}', '-c', code], _raw=True) + self.assertEqual(status, 0) + self.assertEqual(out, '\0' * (1024 * 16 + 1)) + self.assertEqual(err, '\0' * (1024 * 16 + 1)) Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/devel/git-cola/pkg/PLIST,v retrieving revision 1.9 diff -u -p -r1.9 PLIST --- pkg/PLIST 28 May 2017 08:27:35 -0000 1.9 +++ pkg/PLIST 16 Feb 2018 12:17:13 -0000 @@ -206,11 +206,15 @@ share/git-cola/lib/cola/widgets/startup. share/git-cola/lib/cola/widgets/stash.py share/git-cola/lib/cola/widgets/status.py share/git-cola/lib/cola/widgets/text.py +share/git-cola/lib/cola/widgets/toolbar.py +share/git-cola/lib/cola/widgets/toolbarcmds.py share/git-cola/lib/qtpy/ share/git-cola/lib/qtpy/QtCore.py share/git-cola/lib/qtpy/QtDesigner.py share/git-cola/lib/qtpy/QtGui.py +share/git-cola/lib/qtpy/QtMultimedia.py share/git-cola/lib/qtpy/QtNetwork.py +share/git-cola/lib/qtpy/QtOpenGL.py share/git-cola/lib/qtpy/QtPrintSupport.py share/git-cola/lib/qtpy/QtSvg.py share/git-cola/lib/qtpy/QtTest.py @@ -220,10 +224,12 @@ share/git-cola/lib/qtpy/__init__.py share/git-cola/lib/qtpy/_patch/ share/git-cola/lib/qtpy/_patch/__init__.py share/git-cola/lib/qtpy/_patch/qcombobox.py +share/git-cola/lib/qtpy/_patch/qheaderview.py share/git-cola/lib/qtpy/_version.py share/git-cola/lib/qtpy/compat.py share/git-cola/lib/qtpy/py3compat.py share/git-cola/lib/qtpy/uic.py +share/locale/cs/LC_MESSAGES/git-cola.mo share/locale/de/LC_MESSAGES/git-cola.mo share/locale/es/LC_MESSAGES/git-cola.mo share/locale/fr/LC_MESSAGES/git-cola.mo