stage up the ability to run libpg based client integration tests

This commit is contained in:
brianc 2011-02-22 22:48:51 -06:00
parent 20e62cecbf
commit edea8967d2
3 changed files with 11 additions and 1 deletions

View File

@ -25,5 +25,8 @@ test-unit:
test-connection:
@node script/test-connection.js $(params)
test-libpg: test-unit
@find test/integration/client -name "*-tests.js" | $(node-command) --libpg true
test-integration: test-connection
@find test/integration -name "*-tests.js" | $(node-command)

View File

@ -38,6 +38,8 @@ for(var i = 0; i < args.length; i++) {
case '-t':
case '--test':
config.test = args[++i];
case '--libpg':
config.libpg = (args[++i] == "true");
default:
break;
}

View File

@ -1,6 +1,5 @@
require.paths.unshift(__dirname + '/../lib/');
Client = require('client');
EventEmitter = require('events').EventEmitter;
sys = require('sys');
@ -10,6 +9,12 @@ buffers = require(__dirname + '/test-buffers');
Connection = require('connection');
var args = require(__dirname + '/cli');
if(args.libpg) {
} else {
Client = require('client');
}
process.on('uncaughtException', function(d) {
if ('stack' in d && 'message' in d) {
console.log("Message: " + d.message);