[Fusionforge-commits] FusionForge branch master updated. 86448002649acf0af1207c659fe9902f3e474cbd
Sylvain Beucler
beuc-inria at fusionforge.org
Thu Sep 4 17:43:24 CEST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via 86448002649acf0af1207c659fe9902f3e474cbd (commit)
via b3fc1945dc05002aa1306dd0e25f89f66faeb64a (commit)
from 50ccecc091fce75b0ecfaeba13528876ba6a9bf9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 86448002649acf0af1207c659fe9902f3e474cbd
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date: Thu Sep 4 17:42:44 2014 +0200
install: reference asynchronous postgresql init issue
diff --git a/src/post-install.d/db/configure.sh b/src/post-install.d/db/configure.sh
index 3238a77..f21de19 100755
--- a/src/post-install.d/db/configure.sh
+++ b/src/post-install.d/db/configure.sh
@@ -71,4 +71,5 @@ fi
if [ -x /bin/systemctl ]; then
sleep 5 # systemd's postgresql init scripts is stupidly async
# if you have a better way that works across distros...
+ # Cf. http://bugs.debian.org/759725
fi
commit b3fc1945dc05002aa1306dd0e25f89f66faeb64a
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date: Thu Sep 4 17:42:19 2014 +0200
testsuite: clarify tests/ dir
diff --git a/tests/Testsuite.php b/tests/code_and_unit_tests.php
similarity index 54%
copy from tests/Testsuite.php
copy to tests/code_and_unit_tests.php
index b8bf8b7..7551a71 100644
--- a/tests/Testsuite.php
+++ b/tests/code_and_unit_tests.php
@@ -8,9 +8,7 @@ if (!@include_once 'PHPUnit/Autoload.php') {
require_once 'PHPUnit/TextUI/TestRunner.php';
}
-require_once 'func/Testing/SeleniumRemoteSuite.php';
-
-class Testsuite
+class AllTests
{
public static function main()
{
@@ -19,16 +17,13 @@ class Testsuite
public static function suite()
{
- $suite = new SeleniumRemoteSuite('PHPUnit');
+ $suite = new PHPUnit_Framework_TestSuite('PHPUnit');
+
+ // Unit tests
+ $suite->addTestFiles(glob("unit/*/*Test.php"));
- // Selenium tests
- if (!defined('DB_INIT_CMD')) { define('PROJECTA','true'); }
- if (getenv('TESTGLOB') != FALSE)
- $files = glob(getenv('TESTGLOB'));
- else
- $files = glob('func/*/*Test.php');
- natsort($files);
- $suite->addTestFiles($files);
+ // Code tests
+ $suite->addTestFiles(glob("code/*/*Test.php"));
return $suite;
}
diff --git a/tests/func/AllTests.php b/tests/func/AllTests.php
deleted file mode 100644
index 49d9c3d..0000000
--- a/tests/func/AllTests.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'AllTests::main');
-}
-
-if (!@include_once 'PHPUnit/Autoload.php') {
- include_once 'PHPUnit/Framework.php';
- require_once 'PHPUnit/TextUI/TestRunner.php';
-}
-
-// Unit tests
-//require_once 'ACL/AllTests.php';
-
-// Selenium based tests
-require_once 'Site/AllTests.php';
-//require_once 'Trackers/AllTests.php';
-require_once 'Tasks/AllTests.php';
-require_once 'Forums/AllTests.php';
-//require_once 'PluginsWiki/AllTests.php';
-//require_once 'PluginsWebSvn/AllTests.php';
-require_once 'News/AllTests.php';
-//require_once 'scm/AllTests.php';
-//require_once 'docs/AllTests.php';
-// ...
-
-class AllTests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('PHPUnit');
-
- // Unit tests
-// $suite->addTest(ACL_AllTests::suite());
-
- // Integration tests (Selenium).
- $suite->addTest(Site_AllTests::suite());
-// $suite->addTest(Trackers_AllTests::suite());
- $suite->addTest(Tasks_AllTests::suite());
- $suite->addTest(Forums_AllTests::suite());
- $suite->addTest(News_AllTests::suite());
-// $suite->addTest(PluginsWiki_AllTests::suite());
-// $suite->addTest(PluginsWebSvn_AllTests::suite());
-// $suite->addTest(Scm_AllTests::suite());
-// $suite->addTest(Docs_AllTests::suite());
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'AllTests::main') {
- AllTests::main();
-}
diff --git a/tests/func/db_reload.php b/tests/func/db_reload.php
index a2cecb5..4a86c17 100755
--- a/tests/func/db_reload.php
+++ b/tests/func/db_reload.php
@@ -1,5 +1,7 @@
<?php
/*
+ * Alternative to db_reload.sh with ProjectA caching
+ *
* Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
* Copyright (C) 2009 Alain Peyrat, Alcatel-Lucent
*
diff --git a/tests/Testsuite.php b/tests/func_tests.php
similarity index 100%
rename from tests/Testsuite.php
rename to tests/func_tests.php
diff --git a/tests/jenkins/Makefile b/tests/jenkins/Makefile
deleted file mode 100644
index 2d6155d..0000000
--- a/tests/jenkins/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-jenkins-cli.jar: /usr/bin/jar
- jar xvf /usr/share/jenkins/jenkins.war WEB-INF/jenkins-cli.jar
diff --git a/tests/scripts/fusionforge-unittests.sh b/tests/scripts/fusionforge-unittests.sh
index 611238c..a331cec 100755
--- a/tests/scripts/fusionforge-unittests.sh
+++ b/tests/scripts/fusionforge-unittests.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+# syntax and unit tests (i.e. not func/)
. tests/scripts/common-functions
set -e
@@ -7,5 +8,11 @@ get_config
prepare_workspace
# apt-get install pcregrep moreutils xalan
-cd tests; phpunit --log-junit $WORKSPACE/reports/phpunit.xml --coverage-clover $WORKSPACE/reports/coverage/clover.xml --coverage-html $WORKSPACE/reports/coverage/ AllTests.php
-cp $WORKSPACE/reports/phpunit.xml $WORKSPACE/reports/phpunit.xml.org; xalan -in $WORKSPACE/reports/phpunit.xml.org -xsl fix_phpunit.xslt -out $WORKSPACE/reports/phpunit.xml
+cd tests
+phpunit --log-junit $WORKSPACE/reports/phpunit.xml \
+ --coverage-clover $WORKSPACE/reports/coverage/clover.xml \
+ --coverage-html $WORKSPACE/reports/coverage/ \
+ code_and_unit_tests.php
+cp $WORKSPACE/reports/phpunit.xml $WORKSPACE/reports/phpunit.xml.org
+xalan -in $WORKSPACE/reports/phpunit.xml.org -xsl unit/fix_phpunit.xslt \
+ -out $WORKSPACE/reports/phpunit.xml
diff --git a/tests/scripts/phpunit.sh b/tests/scripts/phpunit.sh
index 0c91088..1786de6 100755
--- a/tests/scripts/phpunit.sh
+++ b/tests/scripts/phpunit.sh
@@ -121,7 +121,7 @@ fi
echo "Running PHPunit tests"
retcode=0
cd tests
-phpunit --verbose --debug --stop-on-failure --log-junit $SELENIUM_RC_DIR/phpunit-selenium.xml $@ Testsuite.php || retcode=$?
+phpunit --verbose --debug --stop-on-failure --log-junit $SELENIUM_RC_DIR/phpunit-selenium.xml $@ func_tests.php || retcode=$?
cd ..
kill $pid
# on debian
diff --git a/tests/fix_phpunit.xslt b/tests/unit/fix_phpunit.xslt
similarity index 100%
rename from tests/fix_phpunit.xslt
rename to tests/unit/fix_phpunit.xslt
-----------------------------------------------------------------------
Summary of changes:
src/post-install.d/db/configure.sh | 1 +
tests/{Testsuite.php => code_and_unit_tests.php} | 19 +++-----
tests/func/AllTests.php | 57 ----------------------
tests/func/db_reload.php | 2 +
tests/{Testsuite.php => func_tests.php} | 0
tests/jenkins/Makefile | 2 -
tests/scripts/fusionforge-unittests.sh | 11 ++++-
tests/scripts/phpunit.sh | 2 +-
tests/{ => unit}/fix_phpunit.xslt | 0
9 files changed, 20 insertions(+), 74 deletions(-)
copy tests/{Testsuite.php => code_and_unit_tests.php} (54%)
delete mode 100644 tests/func/AllTests.php
rename tests/{Testsuite.php => func_tests.php} (100%)
delete mode 100644 tests/jenkins/Makefile
rename tests/{ => unit}/fix_phpunit.xslt (100%)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list