Skip to content

Commit edea896

Browse files
committed
stage up the ability to run libpg based client integration tests
1 parent 20e62ce commit edea896

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@ test-unit:
2525
test-connection:
2626
@node script/test-connection.js $(params)
2727

28+
test-libpg: test-unit
29+
@find test/integration/client -name "*-tests.js" | $(node-command) --libpg true
30+
2831
test-integration: test-connection
2932
@find test/integration -name "*-tests.js" | $(node-command)

test/cli.js

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ for(var i = 0; i < args.length; i++) {
3838
case '-t':
3939
case '--test':
4040
config.test = args[++i];
41+
case '--libpg':
42+
config.libpg = (args[++i] == "true");
4143
default:
4244
break;
4345
}

test/test-helper.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
require.paths.unshift(__dirname + '/../lib/');
22

3-
Client = require('client');
43
EventEmitter = require('events').EventEmitter;
54

65
sys = require('sys');
@@ -10,6 +9,12 @@ buffers = require(__dirname + '/test-buffers');
109
Connection = require('connection');
1110
var args = require(__dirname + '/cli');
1211

12+
if(args.libpg) {
13+
} else {
14+
Client = require('client');
15+
}
16+
17+
1318
process.on('uncaughtException', function(d) {
1419
if ('stack' in d && 'message' in d) {
1520
console.log("Message: " + d.message);

0 commit comments

Comments
 (0)