<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">&lt;<a href="mailto:holger@merlinux.eu" target="_blank">holger@merlinux.eu</a>&gt;</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">&gt; On Mon, Jan 25, 2016 at 1:12 PM, holger krekel &lt;<a href="mailto:holger@merlinux.eu">holger@merlinux.eu</a>&gt; wrote:<br>
&gt; &gt; On Mon, Jan 25, 2016 at 13:08 +0300, anatoly techtonik wrote:<br>
&gt; &gt;&gt; Hi,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I need to redirect the result of test to a file, but tox errors out<br>
&gt; &gt;&gt; with invocation<br>
&gt; &gt;&gt; error:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;     ...<br>
&gt; &gt;&gt;     py35 runtests: commands[3] | C:\hexdump\.tox\py35\Scripts\python<br>
&gt; &gt;&gt; hexdump.py -r data/hexdump-wireshark.txt &gt; hexdump-wireshark.bin<br>
&gt; &gt;&gt;     Usage:<br>
&gt; &gt;&gt;       hexdump.py [binfile|-]<br>
&gt; &gt;&gt;       hexdump.py -r hexfile<br>
&gt; &gt;&gt;       hexdump.py --test [logfile]<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;     Options:<br>
&gt; &gt;&gt;       --version      show program&#39;s version number and exit<br>
&gt; &gt;&gt;       -h, --help     show this help message and exit<br>
&gt; &gt;&gt;       -r, --restore  restore binary from hex dump<br>
&gt; &gt;&gt;       --test         run hexdump sanity checks<br>
&gt; &gt;&gt;     ERROR: InvocationError: &#39;C:\\hexdump\\.tox\\py35\\Scripts\\python<br>
&gt; &gt;&gt; hexdump.py -r data/hexdump-wireshark.txt &gt; hexdump-wireshark.bin&#39;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Looks like tox doesn&#39;t support output redirection. What are my options?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;   [tox]<br>
&gt; &gt;&gt;   envlist = py27, py35<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;   [testenv]<br>
&gt; &gt;&gt;   commands =<br>
&gt; &gt;&gt;     {envpython} hexdump.py -r data/hexdump-wireshark.txt &gt; hexdump-wireshark.bin<br>
&gt; &gt;<br>
&gt; &gt; Writing a script and calling that from commands and which does the output redirection.<br>
&gt; &gt; Or doing a PR that introduces output redirection to tox commands.<br>
&gt;<br>
</div></div>&gt; I thought about script, but because scripts on Linux and Windows are<br>
&gt; different, how can I run this script.bat  on Windows and script.sh on<br>
&gt; 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>