<div dir="ltr"><div>Thanks for posting that (and implicitly archiving the knowledge).  Anything that makes test improvement easier is welcomed.<br></div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 5, 2014 at 11:00 AM, Mike Hearn <span dir="ltr">&lt;<a href="mailto:mike@plan99.net" target="_blank">mike@plan99.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I just checked in a change to bitcoinj git master that makes it much easier to create a pull tester jar. Here are instructions for how to do it.<div>

<br></div><div>You will need:</div><div><ul><li>A Java Development Kit (JDK), version 6 or up should work. As Java 6 was released eight years ago, this should not be a challenging requirement. If you have a Mac just running &quot;java&quot; from the command line should give you a GUI prompt to install it automatically. Otherwise apt-get or fetch the latest from the interwebs.<br>


<br></li><li>Apache Maven. This is a rough equivalent of autotools, except it does dependency resolution for you. Grab it from <a href="http://maven.apache.org/download.cgi" target="_blank">http://maven.apache.org/download.cgi</a> then unzip it and make sure the bin directory is in your PATH. You may need to set the JAVA_HOME environment variable if you installed Java to an odd place.<br>


<br></li><li>git</li></ul></div><div>Make sure you can run &quot;javac&quot; from the command line, then make sure you can run &quot;mvn&quot;, it should complain it can&#39;t find a POM (this is a build config file) and not, say, that it can&#39;t find Java.</div>


<div><br></div><div>Now grab bitcoinj from git master:</div><div><br></div><div><font face="courier new, monospace">git clone <a href="https://github.com/bitcoinj/bitcoinj.git" target="_blank">https://github.com/bitcoinj/bitcoinj.git</a></font></div>


<div><br></div><div>... and build ....</div><div><br></div><div><font face="courier new, monospace">cd bitcoinj</font></div><div><font face="courier new, monospace">mvn -DskipTests package</font></div><div><br></div><div>


It will go off and download the libraries needed, compile, and create a bundled executable JAR called core/target/pull-tests.jar. This is sort of analogous to static linking in the Java world. It should be fast - expect a full build plus downloads to take less than a minute. You can use it either with the QA scripts in the bitcoin core qa/pull-tester directory or just run things directly:</div>


<div><br></div><div><font face="courier new, monospace">./bitcoind -regtest -connect=0.0.0.0 -listen -whitelist=127.0.0.1 -datadir=/tmp/pulltester</font></div><div><font face="courier new, monospace">java -jar core/target/pull-tests.jar</font></div>


<div><br></div><div>It should go ahead and print lots of debug spew, then at the end say it&#39;s happy.</div><div><br></div><div>Let me know if you encounter any problems with this.</div><div><br></div><div>Java JARs (which are just zip files renamed) are easily reproduced if you use the same version of javac and the same bitcoinj version. The ZIP container has timestamps, but unzipping them and simply diffing the files between two builds should reveal no differences. I am happy to provide a pull-tests.jar from my local machine if anyone would like to do this.</div>


</div>
<br>------------------------------------------------------------------------------<br>
Infragistics Professional<br>
Build stunning WinForms apps today!<br>
Reboot your WinForms applications with our WinForms controls.<br>
Build a bridge from your legacy apps to the future.<br>
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=153845071&amp;iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=153845071&amp;iu=/4140/ostg.clktrk</a><br>_______________________________________________<br>


Bitcoin-development mailing list<br>
<a href="mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-development@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development" target="_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-development</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Jeff Garzik<br>Bitcoin core developer and open source evangelist<br>BitPay, Inc.      <a href="https://bitpay.com/" target="_blank">https://bitpay.com/</a>
</div>