|
|
@ -67,10 +67,19 @@ if (config.silent) { |
|
|
|
// (Changes here should be also be added to the before() block of test/run.js).
|
|
|
|
// (Changes here should be also be added to the before() block of test/run.js).
|
|
|
|
if (!config.norpc) { |
|
|
|
if (!config.norpc) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
log(`Launching testrpc on port ${port}`); |
|
|
|
// NPM installs the testrpc-sc fork at different locations in node_modules based on
|
|
|
|
const command = './node_modules/ethereumjs-testrpc-sc/bin/testrpc'; |
|
|
|
// whether testrpc is a pre-existing dependency of the project solcover is being added to
|
|
|
|
|
|
|
|
// using (--save-dev).
|
|
|
|
|
|
|
|
let command; |
|
|
|
|
|
|
|
if (shell.test('-e', './node_modules/ethereumjs-testrpc-sc')) { |
|
|
|
|
|
|
|
command = './node_modules/ethereumjs-testrpc-sc/bin/testrpc '; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
command = './node_modules/solcover/node_modules/ethereumjs-testrpc-sc/bin/testrpc '; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const options = `--gasLimit ${gasLimitString} --port ${port}`; |
|
|
|
const options = `--gasLimit ${gasLimitString} --port ${port}`; |
|
|
|
testrpcProcess = childprocess.exec(command + options); |
|
|
|
testrpcProcess = childprocess.exec(command + options); |
|
|
|
|
|
|
|
log(`Launching testrpc on port ${port}`); |
|
|
|
} catch (err) { |
|
|
|
} catch (err) { |
|
|
|
const msg = `There was a problem launching testrpc: ${err}`; |
|
|
|
const msg = `There was a problem launching testrpc: ${err}`; |
|
|
|
cleanUp(msg); |
|
|
|
cleanUp(msg); |
|
|
|