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

cardano-tesnet: allow to specify output directory #6095

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Jan 29, 2025

Description

Adds the --output-dir to the cardano-testnet executable

Fixes #6078

How trust this PR

Use the new flag:

> ls /tmp > tmp-before # for checking data afterwards
> cabal run cardano-testnet -- cardano --testnet-magic 44 --output-dir output-dir

Witness that the output directory gets populated:

> tree output-dir
output-dir/
├── alonzo-genesis.json
├── byron-gen-command
│   └── genesis-keys.000.key
├── byron-genesis.json
├── byron.genesis.spec.json
├── configuration.yaml
├── conway-genesis.json
├── delegate-keys
│   ├── delegate1
│   │   ├── kes.skey
│   │   ├── kes.vkey
│   │   ├── key.skey
│   │   ├── key.vkey
...

You can check that the /tmp directory wasn't used, by comparing its current state with the state before:

> ls /tmp > tmp-after
> diff tmp-before tmp-after
# nothing gets printed

Now test that you can omit the flag:

> ls /tmp > tmp-before-2
> cabal run cardano-testnet -- cardano --testnet-magic 44

Observe that the testnet's log mentions a workspace in /tmp like before this PR:

    forAll77 =
      /tmp/nix-shell.hc4ID6/testnet-test-dc5d67c2dd8545dd
    
    forAll78 =
      Workspace: /tmp/nix-shell.hc4ID6/testnet-test-dc5d67c2dd8545dd

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Self-reviewed the diff

@smelc smelc force-pushed the smelc/cardano-testnet-custom-output-dir branch 3 times, most recently from e0849ba to 4d30612 Compare January 30, 2025 14:13
@smelc smelc force-pushed the smelc/cardano-testnet-custom-output-dir branch from 4d30612 to 55313f5 Compare January 30, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] - cardano-testnet Use flags to specify the output directory for the cluster artifacts
1 participant