Petr Viktorin wrote:
> On 04/07/2016 10:12 PM, Niranjan wrote:
> > Petr Viktorin wrote:
> >> On 04/06/2016 10:55 AM, Niranjan wrote:
> >>> Greetings,
> >>>
> >>> For https://fedorahosted.org/python-pytest-multihost/ticket/6 , i have 
> >>> proposed
> >>> a patch, I think this patch is more of a workaround , than a solution. I 
> >>> would
> >>> like to get more inputs on how to use pytest-multihost to execute 
> >>> commands 
> >>> on Windows. The method i am using requires cygwin with openssh/bash to be
> >>> installed. 
> >>
> >> Wow. I'm surprised the only problem on Windows is the "set -e".
> >>
> >> Regarding the patch:
> >>
> >> - Why is get_winhost_class needed? I don't see it called anywhere.
> >> - Similarly, why is host_type needed? Your patch only sets it.
> >>
> >> If run_command of WinHost and Unix hosts are this similar, I would put
> >> the 'set -e\n' for Unix (and an empty string for Windows) in a class
> >> attribute named e.g. "command_prelude", use it in run_command, and move
> >> run_command from Host to BaseHost.
> >> Would that work, or am I missing something?
> > yes, that would work.
> 
> OK. Can you write a patch?
yes, i will come up with a patch, 
> 
> > But there are few more suggestions, right now
> > test_dir is global and for windows test_dir should be set to
> > ~/$ssh_username/username. So can that also be set ?
> 
> Yes. Add a configuration option to Host (in __init__, from_dict and
> to_dict), and take the global default if not used.
> 
> Then you can let Windows hosts default to either a hard-coded path, or
> to a new global config option like "windows_test_dir".
Okay , thanks for this input. 
> 
> 
> -- 
> Petr Viktorin

Attachment: pgp5Tgi9za4pc.pgp
Description: PGP signature

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to