clean up directory lists, fix warnings when directory traversing, allow users to...
authorRobert Treat <xzilla@users.sourceforge.net>
Sat, 22 Nov 2008 04:51:56 +0000 (23:51 -0500)
committerRobert Treat <xzilla@users.sourceforge.net>
Sat, 22 Nov 2008 04:51:56 +0000 (23:51 -0500)
build_tests.php
tests/selenium/config.test.php-dist

index fec744489e61e882c87bd28deac07e1556d44a87..91a4d96cb9bf983e1385f0082248e77837e93be2 100755 (executable)
@@ -8,19 +8,21 @@
        require('./conf/config.inc.php');
 
        $test_dir = './tests/selenium/';
-       $test_src_dir = "{$test_dir}/src/";
-       $test_static_dir = "{$test_dir}/static/";
-       $testsuite_file = "{$test_static_dir}/TestSuite.html";
+       $test_src_dir = "{$test_dir}src/";
+       $test_static_dir = "{$test_dir}static/";
+       $testsuite_file = "{$test_static_dir}TestSuite.html";
 
        if(isset($argv[1]) && ($argv[1] == 'clean')) {
                echo "Cleaning...";
                /* delete server directories */
                foreach ($conf['servers'] as $server) {
-                       $dir = "{$test_static_dir}/{$server['desc']}";
-                       $dh = opendir($dir);
-                       while($file = readdir($dh))
-                               if (($file != '.') && ($file != '..')) unlink("{$dir}/{$file}");
-                       rmdir($dir);
+                       $dir = "{$test_static_dir}{$server['desc']}";
+                       while(is_dir($dir)) {
+                               $dh = opendir($dir);
+                               while($file = readdir($dh))
+                                       if (($file != '.') && ($file != '..')) unlink("{$dir}/{$file}");
+                               rmdir($dir);
+                       } 
                }
                /* delete the TestSuite.html file */
                @unlink($testsuite_file);
 
        /* 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'],
@@ -61,7 +67,7 @@
 
                $_type = $data = null;
                if (! $_c->conn->isConnected())
-                       die ("Connexion to {$server['desc']} failed !\n");
+                       die ("Connection to {$server['desc']} failed !\n");
                else {
                        if (($_type = $_c->getDriver($platform)) === null) {
                                die( printf($lang['strpostgresqlversionnotsupported'], $postgresqlMinVer));
index 328988fb9ef0186d8b68c8b4da95c9b04bb9adfc..28817ea49d9a7493fee865a768d0c0f301b65c6c 100644 (file)
@@ -1,34 +1,55 @@
 <?php
-/* Set this variable to the root URL of the tested PPA */
+// Set this variable to the root URL of the tested PPA 
 $webUrl = 'http://boox/~ioguix/ppa.git/phppgadmin';
 
-/* Associative array with the super user names for each configured server in your conf/config.inc.php :
-* $superuser = array(
-*      the 'desc' part of the server in your conf/config.inc.php => the super user name,
-*      ...
-* )
-* These profiles are only used to create the admin test role (or user) on each server.
+/* An Array of the servers you want to use for testing, based on the entries
+       found in your conf/config.inc.php file, matching the $server[n]['desc'] 
+       field. Once you have listed the server here, you need to make a 
+       corresponding entry in the $super_user and $super_pass arrays that follow.
 */
-$super_user['7.3'] = $super_user['7.4'] = $super_user['8.0'] =
-$super_user['8.1'] = $super_user['8.2'] = $super_user['8.3'] = 'postgres';
-
-/* Associative array with the super user passwords for each configured server in your conf/config.inc.php :
- * $superpass = array(
- *     the 'desc' part of the server in your conf/config.inc.php => the super user password,
- *     ...
- * )
- */
-$super_pass['7.3'] = $super_pass['7.4'] = $super_pass['8.0'] =
-$super_pass['8.1'] = $super_pass['8.2'] = $super_pass['8.3'] = 'pgpass';
-
-/* name and pass of the admin user to create for tests*/
+
+$test_servers = array('PostgreSQL','Test Server');
+
+/* Associative array with the super user names for each configured server in 
+       your conf/config.inc.php :
+               * $super_user = array(
+               *       the 'desc' part of the server in your conf/config.inc.php => the 
+                       super user name,
+               *       ...
+               * )
+       These profiles are only used to create the admin test role (or user) on 
+       each server.
+*/
+
+$super_user= array(
+       'PostgreSQL' => 'ppa_user', 
+       'Test Server' => 'ppa_user', 
+); 
+
+
+/* Associative array with the super user passwords for each configured server 
+       in your conf/config.inc.php :
+               * $super_pass = array(
+               *       the 'desc' part of the server in your conf/config.inc.php => the 
+                       super user password,
+               *       ...
+               * )
+*/
+$super_pass= array(
+       'PostgreSQL' => 'secret', 
+       'Test Server' => 'password', 
+); 
+
+
+// name and pass of the admin user to create for tests
 $admin_user = 'admin_user';
 $admin_user_pass = 'super';
 
-/* name and pass of the user to create for tests*/
+// name and pass of the user to create for tests
 $user = 'ppa_tests_user';
 $user_pass = 'ppa_tests_user_pass';
 
-/* name of the database to create for tests */
+// name of the database to create for tests 
 $testdb = 'ppatests_db';
-?>
\ No newline at end of file
+
+?>