? INSTALL.pgsql.txt
? client/review/db/pgsql.inc
Index: client/pifr_client.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/client/pifr_client.module,v
retrieving revision 1.6
diff -u -p -r1.6 pifr_client.module
--- client/pifr_client.module	8 Feb 2009 06:04:10 -0000	1.6
+++ client/pifr_client.module	21 Feb 2009 07:22:05 -0000
@@ -15,6 +15,83 @@ define('PIFR_CLIENT_SERVER', variable_ge
 define('PIFR_CLIENT_TIMEOUT', variable_get('pifr_client_timeout', 45));
 
 /**
+ * Implementation on hook_perm
+ */
+function pirf_perm() {
+  return array('configure pifr');
+}
+
+function pifr_client_menu() {
+  $items = array();
+
+  $items['pifr/review'] = array(
+    'title' => 'Review',
+    'page callback' => 'pifr_client_review',
+    'access arguments' => array('access content')
+  );
+  $items['admin/pirf/pifr_client'] = array(
+    'title' => 'Project Issue File Review Configuration',
+    'description' => 'Configure PIFR to the desired testing environment',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('pifr_admin_config'),
+    'access arguments' => array('configure pifr'),
+  );
+  return $items;
+}
+
+function pifr_admin_config() {
+  return system_settings_form(array(
+    'pifr_client_db' => array(
+      '#type' => 'radios',
+      '#title' => 'Database type',
+      '#options' => array(
+        'mysql' => 'MySQL',
+        'pgsql' => 'PostgreSQL',
+        'sqlite' => 'SQLite',
+      ),
+      '#default_value' => variable_get('pifr_client_db', 'mysql'),
+      '#description' => 'This is the database type this testbed will install drupal and run test on.',
+    ),
+  ));
+}
+
+function pifr_client_review() {
+  require_once drupal_get_path('module', 'pifr_client') . '/review/pifr_client_review.inc';
+ 
+  $test = array(
+    'test_id' => 1,
+    'core' => array(
+      'repository' => array(
+        'type' => 'cvs',
+        'url' => ':pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal/drupal',
+      ),
+      'branch_identifier' => 'HEAD',
+    ),
+//    'module' => array(
+//      'repository' => array(
+//        'type' => 'cvs',
+//        'url' => ':pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib/contributions/modules/project_issue_file_review',
+//      ),
+//      'branch_identifier' => 'DRUPAL-6--1',
+//    ),
+//    'file_url' => 'http://drupal.org/files/issues/pifr_stats.patch',
+//    'file_url' => 'http://drupal.org/files/issues/pifr_lint_0.patch',
+//    'file_url' => 'http://drupal.org/files/issues/D7_simpletest_prevent_endless_redirection.patch',
+      'file_url' => 'http://drupal.org/files/issues/349671-postgresql-free-at-last-not-really.patch',
+//    'file_url' => 'http://testing.d6x.loc/sites/testing.d6x.loc/modules/project_issue_file_review/server/confirmation/syntax.patch',
+//    'file_url' => 'http://drupal.org/files/issues/rename_mock_menu_module_2_0.patch',
+//    'file_url' => 'http://drupal.org/files/issues/cron-lynx.sh_d7.patch',
+  );
+  $review = new PIFRClientReview(variable_get('pifr_client_db', 'mysql'), $test);
+  $review->run();
+ 
+  if ($review->hasError()) {
+    return print_r($review->getError(), TRUE);
+  }
+  return 'complete';
+}
+
+/**
  * Implementation of hook_xmlrpc().
  */
 function pifr_client_xmlrpc() {
Index: client/review/browser.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/client/review/browser.inc,v
retrieving revision 1.1
diff -u -p -r1.1 browser.inc
--- client/review/browser.inc	20 Feb 2009 02:08:13 -0000	1.1
+++ client/review/browser.inc	21 Feb 2009 07:22:07 -0000
@@ -120,7 +120,7 @@ class PIFRBrowser {
    *
    * @var Array
    */
-  protected $assertions = array();
+  public $assertions = array();
 
   /**
    * Time limit for the test.
Index: client/review/pifr_client_review.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/client/review/pifr_client_review.inc,v
retrieving revision 1.6
diff -u -p -r1.6 pifr_client_review.inc
--- client/review/pifr_client_review.inc	20 Feb 2009 02:08:13 -0000	1.6
+++ client/review/pifr_client_review.inc	21 Feb 2009 07:22:07 -0000
@@ -71,12 +71,11 @@ class PIFRClientReview {
 
   protected function getDatabaseInformation() {
     global $db_url;
-
-    $url = parse_url($db_url);
+    $url = is_array($db_url) ? parse_url($db_url['default']) : parse_url($db_url);
     $db = array();
     $db['name'] = substr(urldecode($url['path']), 1) . '_checkout';
     $db['username'] = urldecode($url['user']);
-    $db['password'] = urldecode($url['pass']);
+    $db['password'] = isset($url['pass']) ? urldecode($url['pass']) : '';
     return $db;
   }
 
@@ -281,6 +280,10 @@ class PIFRClientReview {
     $edit['username'] = $this->databaseInformation['username'];
     $edit['password'] = $this->databaseInformation['password'];
     $edit['db_prefix'] = '';
+    $databases = $this->getEnabledDatabases();
+    if (in_array(variable_get('pifr_client_db', 'mysql'), $databases) && (count($databases) > 1)) {
+      $edit['driver'] = variable_get('pifr_client_db', 'mysql');  
+    }
     $b->drupalPost(NULL, $edit, t('Save and continue'));
 
     // Step: Site configuration.
@@ -302,6 +305,7 @@ class PIFRClientReview {
 
     // Make sure that site installed correctly.
     if (($b->results['#exception'] + $b->results['#fail']) != 0) {
+      var_dump($b->assertions);die;
       $this->setError();
     }
   }
@@ -400,4 +404,21 @@ class PIFRClientReview {
       $base_path = '/checkout';
     }
   }
+
+  /**
+   * Figure out which databases are available
+   */
+  function getEnabledDatabases() {
+    $databases = array();
+    if (extension_loaded('pdo_mysql')) {
+      $databases[] = 'mysql';
+    }
+    if (extension_loaded('pdo_pgsql')) {
+      $databases[] = 'pgsql';
+    }
+    if (extension_loaded('pdo_sqlite')) {
+      $databases[] = 'sqlite';
+    }
+    return $databases;
+  }
 }
