Skip to content

contrib: run tests against a fresh datadir - #40

Merged
Sjors merged 1 commit into
2140-dev:masterfrom
xyzconstant:fresh-datadir-for-tests
Sep 29, 2026
Merged

Sjors merged 1 commit into
2140-dev:masterfrom
xyzconstant:fresh-datadir-for-tests

Conversation

@xyzconstant

Copy link
Copy Markdown
Contributor

Follow-up to #33 based on #33 (review).

@Sjors

Sjors commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Two minor suggestions from a friendly neighborhood LLM:

I’d print the selected datadir at startup so future CI logs explicitly show it.

My main concern is the fixed directory and unconditional deletion. I’d use a unique mktemp -d directory for each invocation.

run-tests.sh started the node on the default datadir, so it reused
whatever regtest state was already there and left its own behind.
Start it on a fresh `/tmp/capnp-type-tests` instad, recreated on
every run, and pass it to the tests as `BITCOIN_DATADIR`.
@xyzconstant
xyzconstant force-pushed the fresh-datadir-for-tests branch from 0eb1b25 to 369245b Compare September 28, 2026 15:20
@xyzconstant

Copy link
Copy Markdown
Contributor Author

Two minor suggestions from a friendly neighborhood LLM:

I’d print the selected datadir at startup so future CI logs explicitly show it.

My main concern is the fixed directory and unconditional deletion. I’d use a unique mktemp -d directory for each invocation.

Done at 369245b

@rustaceanrob rustaceanrob left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Sjors
Sjors merged commit 369245b into 2140-dev:master Sep 29, 2026
1 check passed
@plebhash plebhash mentioned this pull request Oct 23, 2026
bit-aloo pushed a commit that referenced this pull request Oct 23, 2026
run-tests.sh started the node on the default datadir, so it reused
whatever regtest state was already there and left its own behind.
Start it on a fresh `/tmp/capnp-type-tests` instad, recreated on
every run, and pass it to the tests as `BITCOIN_DATADIR`.

Github-Pull: #40
Rebased-From: 369245b
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.

3 participants