6 echo "You must give the testsuite to run :"
7 echo " - DEBDebian60Tests.php"
8 echo " - RPMCentos52Tests.php"
9 echo " - TarCentos52Tests.php"
11 if [ "x$testsuite" = "x" ]
13 echo "Forge test suite not found"
18 [ ! -f $WORKSPACE/config/phpunit ] || . $WORKSPACE/config/phpunit
19 SELENIUM_RC_DIR=/var/log
20 SELENIUM_RC_URL=${HUDSON_URL}job/${JOB_NAME}/ws/reports
21 SELENIUM_RC_HOST=`hostname -f`
23 CONFIG_PHP=func/config.php
24 export SELENIUM_RC_DIR WORKSPACE SELENIUM_RC_URL SELENIUM_RC_HOST HOST DB_NAME CONFIG_PHP
26 cat <<-EOF >tests/func/config.php
28 // Host where selenium-rc is running
29 define ('SELENIUM_RC_HOST', getenv('SELENIUM_RC_HOST'));
30 define ('SELENIUM_RC_DIR', getenv('SELENIUM_RC_DIR'));
32 // The forge's hostname
33 define ('HOST', getenv('HOST'));
35 // Base URL where FusionForge is installed
38 // Database connection parameters.
39 define('DB_NAME', getenv('DB_NAME'));
40 define('DB_USER', 'gforge');
41 define('DB_PASSWORD', '@@FFDB_PASS@@');
42 define('DB_INIT_CMD', "/root/tests/func/db_reload.sh >/var/log/db_reload.log 2>/var/log/db_reload.errlog");
44 // this should be an existing user of the forge together with its password
45 // (the password should be different from 'myadmin')
46 define ('EXISTING_USER', 'admin');
47 define ('PASSWD_OF_EXISTING_USER', 'myadmin');
49 // Where CLI is installed
50 define ('CLI_CMD', '/opt/gforge/acde/tools/gforge-cli/gforge.php');
52 // Where Java CLI is installed
53 define ('JAGOSI_CMD', '/opt/gforge/acde/tools/gforge-java-cli/');
55 // Enter true when file is configured.
56 define('CONFIGURED', getenv('CONFIGURED'));
59 // DON'T MODIFY BELOW THIS LINE UNLESS YOU KNOW WHAT YOU DO
62 // These are deduced from the previous definitions.
64 // URL to access the application
65 define ('URL', 'http://'.HOST.'/');
67 // WSDL of the forges SOAP API
68 define ('WSDL_URL', URL.'soap/index.php?wsdl');
73 echo "This will run phpunit tests"
75 LANG=C java -jar selenium-server.jar -browserSessionReuse -singleWindow >/dev/null &
76 #LANG=C java -jar selenium-server.jar -singleWindow >/dev/null &
78 phpunit --log-junit $WORKSPACE/reports/phpunit-selenium.xml $testsuite || retcode=$?
81 killall -9 firefox-bin