[PATCH] python: Write py3 bin to correct args location

Alexander Bokovoy ab at samba.org
Tue Feb 13 15:52:22 UTC 2018


On ti, 13 helmi 2018, David Mulder wrote:
> This is causing all python3 tests to fail that pass in env vars.
> 
> Comands written like this were working:
> python /home/dmulder/code/samba/source4/scripting/bin/subunitrun
> Changed to:
> /usr/bin/python3 /home/dmulder/code/samba/source4/scripting/bin/subunitrun
> 
> But commands with env args overwrite the wrong arg:
> CLIENT_IP=127.0.0.11 SOCKET_WRAPPER_DEFAULT_IFACE=11 python
> /home/dmulder/code/samba/source4/scripting/bin/subunitrun
> Changed to:
> /usr/bin/python3 SOCKET_WRAPPER_DEFAULT_IFACE=11 python
> /home/dmulder/code/samba/source4/scripting/bin/subunitrun
> And were further mangled in plantestsuite_loadlist() to:
> /usr/bin/python3
> /home/dmulder/code/samba/source4/scripting/bin/subunitrun
> SOCKET_WRAPPER_DEFAULT_IFACE=11 python
> /home/dmulder/code/samba/source4/scripting/bin/subunitrun
> 
> Please review and merge. Thanks!
Good find, thanks!

RB+

> @@ -570,7 +570,7 @@ def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, ex
>          name = module
>      plantestsuite_loadlist(name, env, args)
>      if py3_compatible and extra_python is not None:
> -        args[0] = subunitrun3
> +        args[args.index(subunitrun)] = subunitrun3
>          plantestsuite_loadlist(name, env, args)
>  
>  


-- 
/ Alexander Bokovoy



More information about the samba-technical mailing list