shared monitor implementation with a conditional variable
or a ring buffer with semaphores
This commit is contained in:
committed by
Patrick Niklaus
parent
438aa66b4c
commit
82acd59a8e
@@ -12,7 +12,7 @@ module.exports = function () {
|
||||
};
|
||||
|
||||
this.runAndSafeOutput = (binary, options, callback) => {
|
||||
this.runBin(binary, this.expandOptions(options), this.environment, (err, stdout, stderr) => {
|
||||
return this.runBin(binary, this.expandOptions(options), this.environment, (err, stdout, stderr) => {
|
||||
this.stdout = stdout;
|
||||
this.stderr = stderr;
|
||||
this.exitCode = err && err.code || 0;
|
||||
@@ -53,8 +53,10 @@ module.exports = function () {
|
||||
this.runAndSafeOutput('osrm-contract', options, () => { callback(); });
|
||||
});
|
||||
|
||||
this.When(/^I run "osrm\-datastore\s?(.*?)"$/, (options, callback) => {
|
||||
this.runAndSafeOutput('osrm-datastore', options, callback);
|
||||
this.When(/^I run "osrm\-datastore\s?(.*?)"(?: with input "([^"]*)")?$/, (options, input, callback) => {
|
||||
let child = this.runAndSafeOutput('osrm-datastore', options, callback);
|
||||
if (input !== undefined)
|
||||
child.stdin.write(input);
|
||||
});
|
||||
|
||||
this.Then(/^it should exit successfully$/, () => {
|
||||
|
||||
Reference in New Issue
Block a user