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

test: session-tool cli tweaks #8717

Merged
merged 3 commits into from
May 25, 2020
Merged

Conversation

zyga
Copy link
Collaborator

@zyga zyga commented May 25, 2020

This branch contains two main changes:

  • session-tool now responds to -h
  • session-tool now supports the new {prepare,exec,restore} interface

I didn't attempt to rename it to the new naming scheme yet as that is under discussion
and will be more invasive. This just sets the stage so that we can use session-tool exec
everywhere.

Please check each patch commit message for details. I specifically did not change the
bulk of the tests so that the new logic is shown to be backwards compatible.

zyga added 3 commits May 25, 2020 12:12
We want to support the -h switch in all the test helpers. This is one.

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
By moving the root check later we can run session-tool -h from a git
checkout and see it operate.

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Originally session-tool started with dash-dash options for triggering
certain behavior, most prominently --prepare and --restore. This patch
adds equivalent non-dash options for everything, in addition to the
brand new "exec" command that replaces the undecorated "session-tool
foo" invocation, to run "foo" inside a session.

Note that almost no test changes are peformed, as this ought to be
entirely backwards compatible. Subsequent patches will move the existing
test catalogue over and at some point we will sunset the old names.
The only exception is the test for session-tool, which nows shows the
new syntax in use.

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
@pedronis pedronis self-requested a review May 25, 2020 12:15
Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

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

thank you

Copy link
Member

@anonymouse64 anonymouse64 left a comment

Choose a reason for hiding this comment

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

LGTM

@zyga zyga merged commit a1ffc32 into snapcore:master May 25, 2020
@zyga zyga deleted the tweak/session-tool-cli branch May 25, 2020 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants