Skip to content

Move testing to nextest#75

Open
ikripaka wants to merge 28 commits into
devfrom
feat/nextest
Open

Move testing to nextest#75
ikripaka wants to merge 28 commits into
devfrom
feat/nextest

Conversation

@ikripaka
Copy link
Copy Markdown
Collaborator

@ikripaka ikripaka commented May 12, 2026

  • This PR suggests a bug fix and I've added the necessary tests.
  • This PR introduces a new feature and I've discussed the update in an Issue or with the team.
  • This PR is just a minor change like a typo fix.

  • migrate existing interface to nextest testing framework https://nexte.st
  • update simplexup to install nextest by default
  • add nextest dependency as a standalone binary, which is installed via simplexup
  • add cargo-binstall dependency for cargo-nextest binary installation

@ikripaka ikripaka self-assigned this May 12, 2026
Base automatically changed from dev to master May 12, 2026 19:06
@Arvolear Arvolear changed the base branch from master to dev May 13, 2026 15:52
@ikripaka ikripaka force-pushed the feat/nextest branch 2 times, most recently from 4e9006f to c60bc81 Compare May 14, 2026 05:43
@ikripaka ikripaka marked this pull request as ready for review May 14, 2026 07:18
@ikripaka ikripaka requested a review from Arvolear as a code owner May 14, 2026 07:18
…installation

* edit simplexup to install local binary version
* add one more verbosity level for additional cargo verbosity
* fix todo for const variable
Comment thread crates/cli/src/commands/test.rs Outdated
Comment thread crates/test/src/config.rs Outdated
Comment thread simplexup/simplexup Outdated
Comment thread crates/cli/src/commands/test.rs
Comment thread crates/cli/src/commands/test.rs
Comment thread simplexup/simplexup Outdated
Comment thread simplexup/simplexup Outdated
Comment thread simplexup/simplexup Outdated
Comment thread crates/cli/src/commands/test.rs Outdated
Comment thread crates/cli/src/commands/test.rs Outdated
* rename --nocapture to --no-capture
Copy link
Copy Markdown
Member

@Arvolear Arvolear left a comment

Choose a reason for hiding this comment

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

Will ask Oleh to take a look and if he is ok, will approve and merge this.

Comment thread crates/cli/src/commands/core.rs Outdated
Comment thread crates/cli/src/commands/test.rs Outdated
Comment thread simplexup/simplexup Outdated
ikripaka added 2 commits May 28, 2026 17:42
add no-capture to -v and -vv options
* add downloading and packing of cargo-nextest into attested zip
* adapt simplexup
/// Show grouped output after the test completion
/// Show detailed output about running tests
#[arg(long = "show-output")]
pub show_output: bool,
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.

Do we need this if we have -v now?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep, I moved the "--verbose" flag from nextest there
It just gives very verbose info about commands that are executed via tests
It isn't connected to "no-capture", but just gives additional info

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

test_bin_args.push("--show-output".into());

Comment thread crates/cli/src/commands/test.rs Outdated

if flags.no_fail_fast {
cargo_test_args.push("--no-fail-fast".into());
// `--test-threads` flag is ignored by nextest when `--no-capture` is enabled
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.

And what does it do? Does it default to 1?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, because enabling threads along with no-capture would turn the output into a mess of logs.
Nextest throws a warning and disables it by default, so I added this if statement to suppress the warning.

Comment thread crates/cli/src/commands/test.rs Outdated
if flags.no_fail_fast {
cargo_test_args.push("--no-fail-fast".into());
// `--test-threads` flag is ignored by nextest when `--no-capture` is enabled
if flags.verbose == 0 {
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.

Why are you putting this if here, where there is a separate function designed exactly to handle the flags?

/// Panics if setting the Ctrl-C handler fails, or if required RPC authentication credentials cannot be unwrapped.
pub fn run(config: &RegtestConfig) -> Result<(), CommandError> {
let (mut client, signer) = RegtestRunner::from_config(config)?;
let (client, signer) = RegtestRunner::from_config(config)?;
Copy link
Copy Markdown
Member

@Arvolear Arvolear May 29, 2026

Choose a reason for hiding this comment

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

Suggested change
let (client, signer) = RegtestRunner::from_config(config)?;
// The client will be killed automatically via the Drop trait implementation
let (client, signer) = RegtestRunner::from_config(config)?;

Comment thread README.md Outdated
mnemonic = "exist carry drive collect lend cereal occur much tiger just involve mean"
bitcoins = 10_000_000
verbosity = 0 # 0 - none, 1 - debug, 2 - trace
verbosity = 0 # 0 - none, 1 - debug, 2 - trace, 3 - trace + additional cargo verbose output
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.

Please check that everything else is up to date.

Suggested change
verbosity = 0 # 0 - none, 1 - debug, 2 - trace, 3 - trace + additional cargo verbose output
verbosity = 0 # 0 - none, 1 - debug, 2 - trace

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I searched for it, but I couldn't find it

Comment thread simplexup/simplexup Outdated
main() {
need_cmd git
need_cmd curl
need_cmd cargo
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.

Do we still need it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'll move it to the install_simplex_from_commit function. It's required there.

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.

2 participants