#!/usr/bin/php Test suite for PPA \n"); fclose($fd); /* Loop on the servers given in the conf/config.inc.conf file */ foreach ($conf['servers'] as $server) { // Is this server in our list of configured servers? if (!in_array($server['desc'],$test_servers)) continue; /* connect to the server to get its version * and test its feature along the tests */ $_c = new Connection($server['host'], $server['port'], $server['sslmode'], $super_user[$server['desc']], $super_pass[$server['desc']], $server['defaultdb'] ); $_type = $data = null; if (! $_c->conn->isConnected()) die ("Connection to {$server['desc']} failed !\n"); else { if (($_type = $_c->getDriver($platform)) === null) { die( printf($lang['strpostgresqlversionnotsupported'], $postgresqlMinVer)); } /* create the database handler we are going to use in the tests creator scripts */ include_once('./classes/database/' . $_type . '.php'); $data = new $_type($_c->conn); $data->platform = $_c->platform; } fprintf(STDERR, "Connected to %s...\n", $server['desc']); if (!is_dir("{$test_static_dir}/{$server['desc']}")) mkdir("{$test_static_dir}/{$server['desc']}"); $fd = opendir($test_src_dir); $files = array(); while ($file = readdir($fd)) if (($file != '.') && ($file != '..')) $files[] = $file; sort($files); /* include the tests creator scripts here * in the order you want them executed. * Each script append itself to the TestSuite.html file. **/ foreach ($files as $testgroupfile) require("{$test_src_dir}/{$testgroupfile}"); } /* close the TestSuite.html file */ $fd = fopen($testsuite_file, 'a'); fprintf($fd, ""); fclose($fd); /* Tests ready to be runned on all your configured servers !!!! */ ?>