-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env tsx | ||
/** | ||
* @file like runTestImages.ts, but for a single proposal, | ||
* and leaves the chain running | ||
*/ | ||
import { execSync } from 'node:child_process'; | ||
import { parseArgs } from 'node:util'; | ||
import { imageNameForProposal, readOneProposal } from './common'; | ||
|
||
const options = { | ||
match: { short: 'm', type: 'string' }, | ||
} as const; | ||
const { values } = parseArgs({ options }); | ||
|
||
const proposal = readOneProposal(values.match!); | ||
const { name } = imageNameForProposal(proposal, 'test'); | ||
|
||
console.log( | ||
` | ||
Starting chain of test image for proposal ${proposal.proposalName} | ||
To get an interactive shell in the container, use an IDE feature like "Attach Shell" or this command:' | ||
docker exec -ti $(docker ps -q -f ancestor=${name}) bash | ||
And within that shell: | ||
cd /usr/src/proposals/<PROPOSAL_PATH> && ./test.sh | ||
The 'proposals' path is mounted in the container so your edits will appear there. | ||
`, | ||
); | ||
|
||
// start the chain, with the repo mounted at /usr/src | ||
const cmd = `docker run --mount type=bind,src=./proposals,dst=/usr/src/proposals -it --entrypoint /usr/src/upgrade-test-scripts/start_agd.sh ${name}`; | ||
execSync(cmd, { stdio: 'inherit' }); |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.