On Fri, Apr 03, 2015 at 12:49:58PM +0100, Edd Barrett wrote: > If you have tested this then I think it is good to go in.
Now turn on tests. OK? Index: Makefile =================================================================== RCS file: /home/edd/cvsync/ports/net/prosody/Makefile,v retrieving revision 1.33 diff -u -p -r1.33 Makefile --- Makefile 3 Apr 2015 15:23:57 -0000 1.33 +++ Makefile 3 Apr 2015 17:17:18 -0000 @@ -4,6 +4,7 @@ SHARED_ONLY= Yes COMMENT= communications server for Jabber/XMPP written in Lua DISTNAME = prosody-0.9.8 +REVISION = 0 CATEGORIES= net MASTER_SITES= http://prosody.im/downloads/source/ @@ -23,12 +24,11 @@ MODLUA_RUN_DEPENDS+= archivers/luazlib \ devel/luafs \ security/luasec \ textproc/luaexpat>=1.3.0 +TEST_DEPENDS = ${MODLUA_RUN_DEPENDS} WANTLIB+= crypto idn SUBST_VARS+= FLAVOR MAKE_PROGRAM -NO_TEST= Yes - CONFIGURE_STYLE=simple CONFIGURE_ARGS+=--prefix="${PREFIX}" \ --sysconfdir="${SYSCONFDIR}/prosody" \ @@ -44,7 +44,8 @@ FAKE_FLAGS+= CONFIG=${DESTDIR}${PREFIX}/ pre-configure: ${SUBST_CMD} ${WRKSRC}/prosody ${WRKSRC}/prosodyctl \ - ${WRKSRC}/certs/Makefile + ${WRKSRC}/certs/Makefile \ + ${WRKSRC}/tests/run_tests.sh post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/prosody @@ -52,5 +53,8 @@ post-install: ${PREFIX}/share/doc/prosody touch ${PREFIX}/share/examples/prosody/prosody.log rm -f ${PREFIX}/share/examples/prosody/certs/Makefile.* + +do-test: + cd ${WRKSRC}/tests && sh run_tests.sh 0 .include <bsd.port.mk> Index: patches/patch-tests_run_tests_sh =================================================================== RCS file: patches/patch-tests_run_tests_sh diff -N patches/patch-tests_run_tests_sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-tests_run_tests_sh 3 Apr 2015 17:18:19 -0000 @@ -0,0 +1,9 @@ +$OpenBSD$ +--- tests/run_tests.sh.orig Tue Mar 24 19:18:04 2015 ++++ tests/run_tests.sh Fri Apr 3 18:17:52 2015 +@@ -1,3 +1,3 @@ + #!/bin/sh +-rm reports/*.report +-lua test.lua $* ++rm -f reports/*.report ++${MODLUA_BIN} test.lua $* Index: patches/patch-tests_test_core_s2smanager_lua =================================================================== RCS file: patches/patch-tests_test_core_s2smanager_lua diff -N patches/patch-tests_test_core_s2smanager_lua --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-tests_test_core_s2smanager_lua 3 Apr 2015 17:16:06 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ +--- tests/test_core_s2smanager.lua.orig Fri Apr 3 18:13:58 2015 ++++ tests/test_core_s2smanager.lua Fri Apr 3 18:15:56 2015 +@@ -6,6 +6,10 @@ + -- COPYING file in the source package for more information. + -- + ++env = { ++ prosody = { events = require "util.events".new() }; ++}; ++ + + function compare_srv_priorities(csp) + local r1 = { priority = 10, weight = 0 } Index: patches/patch-tests_test_lua =================================================================== RCS file: patches/patch-tests_test_lua diff -N patches/patch-tests_test_lua --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-tests_test_lua 3 Apr 2015 17:16:05 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +Spoke with upstream, apparently this should not be here. + +--- tests/test.lua.orig Tue Mar 24 19:18:04 2015 ++++ tests/test.lua Fri Apr 3 18:13:45 2015 +@@ -12,9 +12,7 @@ function run_all_tests() + package.loaded["net.connlisteners"] = { get = function () return {} end }; + dotest "util.jid" + dotest "util.multitable" +- dotest "util.rfc3484" + dotest "net.http" +- dotest "core.modulemanager" + dotest "core.stanza_router" + dotest "core.s2smanager" + dotest "core.configmanager" -- Best Regards Edd Barrett http://www.theunixzoo.co.uk
