<div dir="ltr">BTW, if really do need to use a shell script, you can also remove the .sh extension for the Linux script and call ./script (the .bat extension is optional on Windows).<div><br></div><div>André</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 25, 2016 at 2:47 PM, holger krekel <span dir="ltr"><<a href="mailto:holger@merlinux.eu" target="_blank">holger@merlinux.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Jan 25, 2016 at 15:38 +0300, anatoly techtonik wrote:<br>
<div><div class="h5">> On Mon, Jan 25, 2016 at 1:12 PM, holger krekel <<a href="mailto:holger@merlinux.eu">holger@merlinux.eu</a>> wrote:<br>
> > On Mon, Jan 25, 2016 at 13:08 +0300, anatoly techtonik wrote:<br>
> >> Hi,<br>
> >><br>
> >> I need to redirect the result of test to a file, but tox errors out<br>
> >> with invocation<br>
> >> error:<br>
> >><br>
> >> ...<br>
> >> py35 runtests: commands[3] | C:\hexdump\.tox\py35\Scripts\python<br>
> >> hexdump.py -r data/hexdump-wireshark.txt > hexdump-wireshark.bin<br>
> >> Usage:<br>
> >> hexdump.py [binfile|-]<br>
> >> hexdump.py -r hexfile<br>
> >> hexdump.py --test [logfile]<br>
> >><br>
> >> Options:<br>
> >> --version show program's version number and exit<br>
> >> -h, --help show this help message and exit<br>
> >> -r, --restore restore binary from hex dump<br>
> >> --test run hexdump sanity checks<br>
> >> ERROR: InvocationError: 'C:\\hexdump\\.tox\\py35\\Scripts\\python<br>
> >> hexdump.py -r data/hexdump-wireshark.txt > hexdump-wireshark.bin'<br>
> >><br>
> >><br>
> >> Looks like tox doesn't support output redirection. What are my options?<br>
> >><br>
> >> [tox]<br>
> >> envlist = py27, py35<br>
> >><br>
> >> [testenv]<br>
> >> commands =<br>
> >> {envpython} hexdump.py -r data/hexdump-wireshark.txt > hexdump-wireshark.bin<br>
> ><br>
> > Writing a script and calling that from commands and which does the output redirection.<br>
> > Or doing a PR that introduces output redirection to tox commands.<br>
><br>
</div></div>> I thought about script, but because scripts on Linux and Windows are<br>
> different, how can I run this script.bat on Windows and script.sh on<br>
> Linux with tox?<br>
<br>
use python, luke! :)<br>
<br>
you can run {envpython} somepythonscript.py<br>
<span class="HOEnZb"><font color="#888888"><br>
holger<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" rel="noreferrer" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
</div></div></blockquote></div><br></div>