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

Add verbose CLI flag to the writer::Basic (#192) #193

Merged
merged 9 commits into from
Dec 27, 2021
Merged

Conversation

ilslv
Copy link
Member

@ilslv ilslv commented Dec 24, 2021

Resolves #192

Synopsis

For now there is no way to skip printing World on failed Steps.

Solution

Add skip-world CLI flag.

Checklist

  • Created PR:
    • In draft mode
    • Name contains Draft: prefix
    • Name contains issue reference
    • Has assignee
  • Documentation is updated (if required)
  • Tests are updated (if required)
  • Changes conform code style
  • CHANGELOG entry is added (if required)
  • FCM (final commit message) is posted
    • and approved
  • Review is completed and changes are approved
  • Before merge:
    • Milestone is set
    • PR's name and description are correct and up-to-date
    • Draft: prefix is removed
    • All temporary labels are removed

@ilslv ilslv added the enhancement Improvement of existing features or bugfix label Dec 24, 2021
@ilslv ilslv added this to the 0.11 milestone Dec 24, 2021
@ilslv ilslv self-assigned this Dec 24, 2021
@ilslv ilslv changed the title Draft: Add skip_world flag to the writer::Basic Draft: Add verbose CLI flag to the writer::Basic Dec 27, 2021
@ilslv ilslv changed the title Draft: Add verbose CLI flag to the writer::Basic Draft: Add verbose CLI flag to the writer::Basic (#192) Dec 27, 2021
@ilslv
Copy link
Member Author

ilslv commented Dec 27, 2021

FCM

Add `verbose` CLI flag to the `writer::Basic` (#193, #192)

@ilslv ilslv marked this pull request as ready for review December 27, 2021 06:13
@ilslv ilslv changed the title Draft: Add verbose CLI flag to the writer::Basic (#192) Add verbose CLI flag to the writer::Basic (#192) Dec 27, 2021
@ilslv
Copy link
Member Author

ilslv commented Dec 27, 2021

@tyranron It looks like GitHub Actions are struggling today. Some of the tests hang with log output, despite restarting 3 times

2021-12-27T08:39:08.8808297Z Found online and idle hosted runner in the current repository's organization account that matches the required labels: 'windows-latest'
2021-12-27T08:39:08.9420417Z Waiting for a Hosted runner in the 'organization' to pick this job...
2021-12-27T08:40:09.7555232Z Job was not picked up by the preferred runner, try requesting additional runners to run this job
2021-12-27T08:40:09.9047715Z Waiting for a self-hosted runner to pickup this job...
2021-12-27T08:40:44.9874642Z Job is waiting for a hosted runner to come online.
2021-12-27T08:40:48.3923630Z Job is about to start running on the hosted runner: GitHub Actions 5 (hosted)

@ilslv ilslv requested a review from tyranron December 27, 2021 09:08
/// '-v' outputs World on failed Steps.
/// '-vv' additionally outputs Docstring.
#[clap(short, parse(from_occurrences))]
pub verbose: u8,
Copy link
Member

Choose a reason for hiding this comment

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

This way we loose an ability to specify -v 0. I guess we shoud shift them for -v being the default None and -vv outputing World on failed Steps.

@@ -81,6 +83,64 @@ impl FromStr for Coloring {
}
}

/// Verbosity level of the output.
#[derive(Clone, Copy, Debug)]
pub enum Verbosity {
Copy link
Member

Choose a reason for hiding this comment

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

This may be declared in writer/mod.rs and be a common one.

@@ -350,7 +350,7 @@ impl<W: Debug, Out: io::Write> JUnit<W, Out> {
let mut basic_wr = writer::Basic::raw(
WritableString(String::new()),
Coloring::Never,
false,
writer::basic::Verbosity::OutputWorld,
Copy link
Member

Choose a reason for hiding this comment

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

I guess now we should introduce similar option for writer::Junit.

@tyranron tyranron merged commit c969313 into main Dec 27, 2021
@tyranron tyranron deleted the skip-printing-world branch December 27, 2021 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command line option to disable printing World when there are failed tests or panics
2 participants