From 1bda2d3f30a863c92934220151aeeee44038a323 Mon Sep 17 00:00:00 2001
From: Jimmy Berry <jimmy@boombatower.com>
Date: Sat, 22 Oct 2011 00:14:04 -0500
Subject: #1317528: Separate the testbot from the installer.

---
 modules/simpletest/simpletest.drush.inc |   64 +++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 modules/simpletest/simpletest.drush.inc

diff --git a/modules/simpletest/simpletest.drush.inc b/modules/simpletest/simpletest.drush.inc
new file mode 100644
index 0000000..2a5cd91
--- /dev/null
+++ b/modules/simpletest/simpletest.drush.inc
@@ -0,0 +1,64 @@
+<?php
+/**
+ * @file
+ * Provide Drush integration.
+ */
+
+/**
+ * Implements hook_drush_command().
+ */
+function simpletest_drush_command() {
+  $items = array();
+
+  $items['simpletest-install'] = array(
+    'description' => 'Install drupal assuming "drupal" for database name, user, pass; admin account name and pass.',
+    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
+  );
+
+  return $items;
+}
+
+/**
+ * Install drupal for use by testing.
+ */
+function drush_simpletest_install() {
+  define('MAINTENANCE_MODE', 'install');
+  define('DRUPAL_ROOT', getcwd());
+  require DRUPAL_ROOT . '/includes/install.core.inc';
+
+  $settings = array(
+    'parameters' => array(
+      'profile' => 'testing',
+      'locale' => 'en',
+    ),
+    'forms' => array(
+      'install_settings_form' => array(
+        'mysql' => array(
+          'database' => 'drupal',
+          'username' => 'drupal',
+          'password' => 'drupal',
+          'host' => 'localhost',
+          'port' => '',
+          'driver' => 'mysql',
+          'prefix' => '',
+        ),
+      ),
+      'install_configure_form' => array(
+        'site_name' => 'Testing installation',
+        'site_mail' => 'drupal@example.com',
+        'account' => array(
+          'name' => 'drupal',
+          'mail' => 'drupal@example.com',
+          'pass' => array(
+            'pass1' => 'drupal',
+            'pass2' => 'drupal',
+          ),
+        ),
+        'update_status_module' => array(),
+        'clean_url' => TRUE,
+      ),
+    ),
+  );
+  install_drupal($settings);
+  module_enable(array('simpletest'));
+}
-- 
1.7.7

