src/www/widgets/widgets.php -text
tests/AllFullTests.php -text
tests/AllTests.php -text
+tests/CDXCentos52Tests.php -text
tests/DEBDebian60Tests.php -text
tests/RPMCentos52Tests.php -text
tests/SeleniumTests.php -text
--- /dev/null
+<?php
+if (!defined('PHPUnit_MAIN_METHOD')) {
+ define('PHPUnit_MAIN_METHOD', 'AllTests::main');
+}
+
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/TextUI/TestRunner.php';
+require_once 'func/Testing/RPMSeleniumRemoteSuite.php';
+
+class CDXCentos52Tests
+{
+ public static function main()
+ {
+ PHPUnit_TextUI_TestRunner::run(self::suite());
+ }
+
+ public static function suite()
+ {
+ $suite = new RPMSeleniumRemoteSuite('PHPUnit');
+
+ // Selenium tests
+// $suite->addTestFiles(glob("func/Site/*Test.php"));
+// $suite->addTestFiles(glob("func/Trackers/*Test.php"));
+// $suite->addTestFiles(glob("func/Tasks/*Test.php"));
+// $suite->addTestFiles(glob("func/Docs/*Test.php"));
+// $suite->addTestFiles(glob("func/Forums/*Test.php"));
+// $suite->addTestFiles(glob("func/News/*Test.php"));
+// $suite->addTestFiles(glob("func/PluginsBlocks/*Test.php"));
+// $suite->addTestFiles(glob("func/PluginsOnlineHelp/*Test.php"));
+//// $suite->addTestFiles(glob("func/PluginsSvnTracker/*Test.php"));
+// $suite->addTestFiles(glob("func/RBAC/*Test.php"));
+// $suite->addTestFiles(glob("func/Surveys/*Test.php"));
+
+ return $suite;
+ }
+}
+
+if (PHPUnit_MAIN_METHOD == 'AllTests::main') {
+ AllTests::main();
+}
+?>
-#! /bin/sh -e
+#! /bin/sh -x
export CURDIR=`pwd`
export WORKSPACE=${WORKSPACE:-$CURDIR}
[ ! -d $WORKSPACE/reports ] || rm -fr $WORKSPACE/reports
mkdir -p $WORKSPACE/build/packages $WORKSPACE/build/config $WORKSPACE/reports/coverage
+cat > $WORKSPACE/build/config/phpunit <<-EOF
+HUDSON_URL=$HUDSON_URL
+JOB_NAME=$JOB_NAME
+EOF
+
+scp -r tests root@$HOST:/root
+scp -r $WORKSPACE/build/config root@$HOST:/root
+scp 3rd-party/selenium/binary/selenium-server-current/selenium-server.jar root@$HOST:/root
+
# EPEL
cp src/rpm-specific/epel-short.repo $WORKSPACE/build/packages/epel.repo
if [ ! -z "$EPEL_REPO" ] ; then
ssh root@$HOST yum install -y $CDXPACKAGES
ssh root@$HOST /root/codendi_install.sh
-ssh root@cdx40.local /usr/share/codendi/src/utils/generate_ssl_certificate.sh <<-FIN
+ssh root@$HOST /usr/share/codendi/src/utils/generate_ssl_certificate.sh <<-FIN
y
FR
ISERE
FIN
#================
+retcode=0
+
+echo "Run phpunit test on $HOST"
+ssh -X root@$HOST "tests/scripts/phpunit.sh CDXCentos52Tests.php" || retcode=$?
+
+if [ "x$SELENIUM_RC_DIR" != "x" ]
+then
+ rsync -av root@$HOST:/var/log/ $SELENIUM_RC_DIR/
+fi
+cp $WORKSPACE/reports/phpunit-selenium.xml $WORKSPACE/reports/phpunit-selenium.xml.org
+xalan -in $WORKSPACE/reports/phpunit-selenium.xml.org -xsl fix_phpunit.xslt -out $WORKSPACE/reports/phpunit-selenium.xml
+#================
if $KEEPVM
then