Cleaning up.

This commit is contained in:
jgen 2014-02-19 16:16:01 -05:00
parent bdbb280064
commit 7d90c20297
3 changed files with 9 additions and 24 deletions

View file

@ -31,15 +31,12 @@ script:
after_failure:
- sudo cat /etc/nginx/sites-enabled/default
- sudo cat /var/log/nginx/error.log
- sudo ls -al
- sudo ls -al
- sudo ls -al data/config/
- sudo cat data/config/shimmie.conf.php
- sudo cat data/config/extensions.conf.php
- sudo cat /var/log/php5-fpm.log
- sudo cat /var/log/mysql.log
- sudo cat /var/log/mysql.err
# configure notifications (email, IRC, campfire etc)
#notifications:
# irc: "irc.freenode.org#travis"
# irc: "irc.freenode.org#shimmie"
#

View file

@ -332,7 +332,6 @@ class Database {
$this->connect_engine();
$this->engine->init($this->db);
// FIXME: this causes problems with running via the PHP CLI
$this->beginTransaction();
}
@ -394,7 +393,7 @@ class Database {
* Execute an SQL query and return an PDO resultset
*/
public function execute($query, $args=array()) {
//try {
try {
if(is_null($this->db)) $this->connect_db();
_count_execs($this->db, $query, $args);
$stmt = $this->db->prepare($query);
@ -413,10 +412,10 @@ class Database {
$stmt->execute($args);
}
return $stmt;
/*}
}
catch(PDOException $pdoe) {
throw new SCoreException($pdoe->getMessage()."<p><b>Query:</b> ".$query);
}*/
}
}
/**

View file

@ -53,33 +53,22 @@ foreach(_get_themelet_files(get_theme()) as $themelet) {
_load_extensions();
// Put the database into autocommit mode.
// Put the database into autocommit mode. (We don't really need transactions for the test setup)
$database->commit();
// Create the necessary users for the tests.
$userPage = new UserPage();
$userPage->onUserCreation(new UserCreationEvent("demo", "demo", ""));
//$database->commit(); // Need to commit the new user to the database.
//$database->beginTransaction();
$userPage->onUserCreation(new UserCreationEvent("test", "test", ""));
//$database->commit(); // Need to commit the new user to the database.
//$database->beginTransaction();
// Continue
// Fire off the InitExtEvent()
$page = class_exists("CustomPage") ? new CustomPage() : new Page();
$user = _get_user();
send_event(new InitExtEvent());
// Now we can run all the tests.
// Now we can actually run all the tests.
$all = new TestFinder("");
$results = $all->run(new TextReporter());
// At this point this isn't really necessary as the test machines are stateless.
//$database->commit();
// Travis-CI needs to know the results of the tests.
exit ($results ? 0 : 1);