diff --git a/multichain-testing/test/support.ts b/multichain-testing/test/support.ts index 9c2a297296e..f98b5a13f08 100644 --- a/multichain-testing/test/support.ts +++ b/multichain-testing/test/support.ts @@ -89,6 +89,7 @@ export const commonSetup = async (t: ExecutionContext) => { const startContract = async ( contractName: string, contractBuilder: string, + builderOpts?: Record, ) => { const { vstorageClient } = tools; const instances = Object.fromEntries( @@ -98,7 +99,7 @@ export const commonSetup = async (t: ExecutionContext) => { return t.log('Contract found. Skipping installation...'); } t.log('bundle and install contract', contractName); - await deployBuilder(contractBuilder); + await deployBuilder(contractBuilder, builderOpts); await retryUntilCondition( () => vstorageClient.queryData(`published.agoricNames.instance`), res => contractName in Object.fromEntries(res), diff --git a/multichain-testing/tools/deploy.ts b/multichain-testing/tools/deploy.ts index 17b70cf5bb4..52a460f6094 100755 --- a/multichain-testing/tools/deploy.ts +++ b/multichain-testing/tools/deploy.ts @@ -2,6 +2,7 @@ import { createRequire } from 'module'; import type { AgdTools } from './agd-tools.js'; import type { CoreEvalPlan } from '@agoric/deploy-script-support/src/writeCoreEvalParts.js'; +import { flags } from './agd-lib.js'; const nodeRequire = createRequire(import.meta.url); @@ -10,10 +11,16 @@ export const makeDeployBuilder = ( readJSON: typeof import('fs-extra').readJSON, execa: typeof import('execa').execa, ) => - async function deployBuilder(builder: string) { + async function deployBuilder( + builder: string, + builderOpts?: Record, + ) { console.log(`building plan: ${builder}`); - // build the plan - const { stdout } = await execa`agoric run ${builder}`; + const args = ['run', builder]; + if (builderOpts) { + args.push(...flags(builderOpts)); + } + const { stdout } = await execa('agoric', args); const match = stdout.match(/ (?[-\w]+)-permit.json/); if (!(match && match.groups)) { throw Error('no permit found');