|
|
@ -164,8 +164,26 @@ var runTestFiles = function (filepath, isDirectory, web3, opts) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (isDirectory) { |
|
|
|
if (isDirectory) { |
|
|
|
fs.readdirSync(filepath).forEach(filename => { |
|
|
|
fs.walkSync = function (start, callback) { |
|
|
|
gatherContractsFrom(filename) |
|
|
|
fs.readdirSync(start).forEach(name => { |
|
|
|
|
|
|
|
if (name === 'node_modules') { |
|
|
|
|
|
|
|
return; // hack
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var abspath = path.join(start, name); |
|
|
|
|
|
|
|
if (fs.statSync(abspath).isDirectory()) { |
|
|
|
|
|
|
|
fs.walkSync(abspath, callback); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
callback(abspath); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
fs.walkSync(filepath, foundpath => { |
|
|
|
|
|
|
|
if (foundpath.indexOf('_test.sol') < 0) { |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Object.keys(compilationResult[foundpath]).forEach(contractName => { |
|
|
|
|
|
|
|
contractsToTest.push(contractName) |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
gatherContractsFrom(filepath) |
|
|
|
gatherContractsFrom(filepath) |
|
|
|