Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip gas reporting when --parallel flag detected #101

Merged
merged 1 commit into from
Feb 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,20 @@ async function getResolvedRemoteContracts(
subtask(TASK_TEST_RUN_MOCHA_TESTS).setAction(
async (args: any, hre, runSuper) => {

// Temporarily prohibiting parallel mode because it crashes and unsure how to resolve...
if (args.parallel === true) {
throw new HardhatPluginError("hardhat-gas-reporter", `Parallel tests are not supported`);
}

let options = getOptions(hre);
options.getContracts = getContracts.bind(null, hre.artifacts, options.excludeContracts);

if (options.enabled) {
// Temporarily skipping when in parallel mode because it crashes and unsure how to resolve...
if (args.parallel === true) {
const result = await runSuper();
console.log(
"Note: Gas reporting has been skipped because plugin `hardhat-gas-reporter` does not support " +
"the --parallel flag."
);
return result;
}

// Fetch data from gas and coin price providers
options = new InternalReporterConfig(options);
await setGasAndPriceRates(options);
Expand Down