Merge branch 'master' into filedecoratorplugin

pull/5370/head
Aniket 2 years ago committed by GitHub
commit bcd3bc404e
  1. 12
      libs/remix-tests/src/run.ts

@ -64,7 +64,7 @@ commander
// If path is for a file, file name must have `_test.sol` suffix
if (!isDirectory && !testsPath.endsWith('_test.sol')) {
log.error('Test filename should end with "_test.sol"')
process.exit()
process.exit(1)
}
// Console message
@ -85,7 +85,7 @@ commander
const compString = releases ? releases[compVersion] : null
if (!compString) {
log.error(`No compiler found in releases with version ${compVersion}`)
process.exit()
process.exit(1)
} else {
compilerConfig.currentCompilerUrl = compString.replace('soljson-', '').replace('.js', '')
log.info(`Compiler version set to ${compVersion}. Latest version is ${latestRelease}`)
@ -105,7 +105,7 @@ commander
if (commander.runs) {
if (!commander.optimize) {
log.error('Optimization should be enabled for runs')
process.exit()
process.exit(1)
}
compilerConfig.runs = commander.runs
log.info(`Runs set to ${compilerConfig.runs}`)
@ -116,12 +116,14 @@ commander
await provider.init()
web3.setProvider(provider)
extend(web3)
runTestFiles(path.resolve(testsPath), isDirectory, web3, compilerConfig)
runTestFiles(path.resolve(testsPath), isDirectory, web3, compilerConfig, (error) => {
if (error) process.exit(1)
})
})
if (!process.argv.slice(2).length) {
log.error('Please specify a file or directory path')
process.exit()
process.exit(1)
}
commander.parse(process.argv)

Loading…
Cancel
Save