null+****@clear*****
null+****@clear*****
2012年 8月 6日 (月) 13:14:26 JST
SHIMODA Hiroshi 2012-08-06 13:14:26 +0900 (Mon, 06 Aug 2012) New Revision: 99d2f33b6002f4ddc330a3d163e4dc14110d1a79 https://github.com/groonga/gcs/commit/99d2f33b6002f4ddc330a3d163e4dc14110d1a79 Log: Run commands actually with delay Modified files: test/test-utils.js Modified: test/test-utils.js (+17 -15) =================================================================== --- test/test-utils.js 2012-08-06 12:57:28 +0900 (d4a832c) +++ test/test-utils.js 2012-08-06 13:14:26 +0900 (14a4c89) @@ -158,21 +158,23 @@ function run() { var deferred = new Deferred(); var options = Array.prototype.slice.call(arguments, 0) - var commandName = options.shift(); - var commandPath = __dirname + '/../bin/' + commandName; - var command = spawn(commandPath, options); - var output = { - stdout: '', - stderr: '' - }; - command.stdout.on('data', function(data) { - output.stdout += data; - }); - command.stderr.on('data', function(data) { - output.stderr += data; - }); - command.on('exit', function(code) { - deferred.call({ code: code, output: output }); + Deferred.next(function() { + var commandName = options.shift(); + var commandPath = __dirname + '/../bin/' + commandName; + var command = spawn(commandPath, options); + var output = { + stdout: '', + stderr: '' + }; + command.stdout.on('data', function(data) { + output.stdout += data; + }); + command.stderr.on('data', function(data) { + output.stderr += data; + }); + command.on('exit', function(code) { + deferred.call({ code: code, output: output }); + }); }); return deferred; -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...Download