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 -u|--unanimous flag: easily identify whether all engines agree on output #22

Closed
dilijev opened this issue May 4, 2017 · 4 comments
Assignees

Comments

@dilijev
Copy link
Collaborator

dilijev commented May 4, 2017

To help with automatic comparative testing between engines, add a -q|--quorum flag. Behavior will be as follows:

  • If all engines under test produce identical output (logic already exists to test this in the collate option), print no output and set exit code to 0.
  • If any engine disagrees, show output, and set exit code to 1
    • Alternatively: set the exit code to (1 + the index of the engine in the config file) to more easily identify which engine disagreed. Perhaps -1 if more than one engine disagrees or there is a greater than 2-way split on the outputs.

/cc @bterlson

@bterlson
Copy link
Owner

bterlson commented May 4, 2017

I think communicating the hosts with different results via exit code isn't a great design. Probably the stdout should contain this info in an easily parseable format?

@dilijev
Copy link
Collaborator Author

dilijev commented May 4, 2017

@bterlson Yeah, communication via the exit code was a bit of a stretch. I'd say the output format is not necessarily super important for a first pass at this feature, but an easily-parseable format would definitely be good.

I'm trying to decide whether the current default collated output is not, in fact, easily parseable. I suppose the only problematic things are the colors and if your test output has a line that starts with #### you would be in trouble. Maybe strip the colors and indent the entire output block so only the engine identification lines are left-justified?

@dilijev
Copy link
Collaborator Author

dilijev commented May 16, 2017

Started work on this here: https://github.com/dilijev/eshost-cli/tree/quorum

@dilijev dilijev self-assigned this Jul 29, 2017
@dilijev dilijev changed the title Add -q|--quorum flag: easily identify whether all engines agree on output Add -u|--unanimous flag: easily identify whether all engines agree on output Aug 4, 2017
@dilijev
Copy link
Collaborator Author

dilijev commented Aug 4, 2017

Renaming option to --unanimous as per feedback in #35

rwaldron added a commit to rwaldron/eshost-cli that referenced this issue Aug 23, 2017
…ilijev-quorum

* 'quorum' of https://github.com/dilijev/eshost-cli:
  Rename `--quorum, -q` to `--unanimous, -u`
  Resolve bterlson#22: `--quorum` will exit(0) and output nothing if all hosts agree.
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

No branches or pull requests

2 participants