summaryrefslogtreecommitdiff
path: root/10/c6a078f5c23253be47e13af7bd949f697dfa68
blob: 825fb224fbb9283fa0cae4da65aa67db3f4a1813 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191]
	helo=mx.sourceforge.net)
	by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <jgarzik@bitpay.com>) id 1XEh1i-0001AA-Mi
	for bitcoin-development@lists.sourceforge.net;
	Tue, 05 Aug 2014 15:51:50 +0000
Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of bitpay.com
	designates 209.85.213.182 as permitted sender)
	client-ip=209.85.213.182; envelope-from=jgarzik@bitpay.com;
	helo=mail-ig0-f182.google.com; 
Received: from mail-ig0-f182.google.com ([209.85.213.182])
	by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1XEh1h-0008F7-EB
	for bitcoin-development@lists.sourceforge.net;
	Tue, 05 Aug 2014 15:51:50 +0000
Received: by mail-ig0-f182.google.com with SMTP id c1so1387238igq.3
	for <bitcoin-development@lists.sourceforge.net>;
	Tue, 05 Aug 2014 08:51:44 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc:content-type;
	bh=VEEAw3FI4KksFwfsWwT/fD4+JCDd6EGL/WMunONZH/o=;
	b=J5jUjWNiwjL/A626dEVnE+s1QTfpXpwpA/jFRa/GSEVymRf4RMWmgqRBmnMBCINVKb
	KmiFf7cS/kEbbBazOtnT3XdqhzfHffPW7c5IkxuP0La6Gct6mRq+ln8EC/gq7hP/I5SB
	JpoAStaNZysDdX7OiL5hLgoOPFN5YZwcgKob/kamnZjfeDk1DqsGkIp2/y0I+ztDEvYQ
	8mUMKsGPJgjO+r/MtXwXEcCNRORJUNmZkWqXOB6pJ2DL15JRQ26rL6n2dqQB0GG/A+QB
	67lfJyC2BJ0k3HSpG0evimrtSjepNfeCtCT6DlmVFZ3H++EJJAHrq6ktearibWZ2NGa+
	juwQ==
X-Gm-Message-State: ALoCoQlWVWRhL6WxpEpB6ueQ39nVHmuQv+Dg9O+8e/EhFxKQPLegFofwuFCMYWFviOiQk9DFdJw8
X-Received: by 10.42.178.133 with SMTP id bm5mr6477905icb.75.1407253556141;
	Tue, 05 Aug 2014 08:45:56 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.10.78 with HTTP; Tue, 5 Aug 2014 08:45:35 -0700 (PDT)
In-Reply-To: <CANEZrP1mU6iS6NRyK6iJtg4BEQ3nQRFc-dVwaOd+P_NFThqxjw@mail.gmail.com>
References: <CANEZrP1mU6iS6NRyK6iJtg4BEQ3nQRFc-dVwaOd+P_NFThqxjw@mail.gmail.com>
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 5 Aug 2014 11:45:35 -0400
Message-ID: <CAJHLa0NdJhGyFfhzhxmL3=qNjYed0+FQ-X4EQdrVMR3K4Het7Q@mail.gmail.com>
To: Mike Hearn <mike@plan99.net>
Content-Type: multipart/alternative; boundary=90e6ba6e8d9052b66c04ffe3c0cb
X-Spam-Score: -0.6 (/)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
	sender-domain
	-0.0 SPF_PASS               SPF: sender matches SPF record
	1.0 HTML_MESSAGE           BODY: HTML included in message
	-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	author's domain
	0.1 DKIM_SIGNED            Message has a DKIM or DK signature,
	not necessarily valid
	-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Headers-End: 1XEh1h-0008F7-EB
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] How to create a pull tester JAR
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Tue, 05 Aug 2014 15:51:50 -0000

--90e6ba6e8d9052b66c04ffe3c0cb
Content-Type: text/plain; charset=UTF-8

Thanks for posting that (and implicitly archiving the knowledge).  Anything
that makes test improvement easier is welcomed.



On Tue, Aug 5, 2014 at 11:00 AM, Mike Hearn <mike@plan99.net> wrote:

> 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.
>
> You will need:
>
>    - 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 "java" from the command line should give you
>    a GUI prompt to install it automatically. Otherwise apt-get or fetch the
>    latest from the interwebs.
>
>    - Apache Maven. This is a rough equivalent of autotools, except it
>    does dependency resolution for you. Grab it from
>    http://maven.apache.org/download.cgi 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.
>
>    - git
>
> Make sure you can run "javac" from the command line, then make sure you
> can run "mvn", it should complain it can't find a POM (this is a build
> config file) and not, say, that it can't find Java.
>
> Now grab bitcoinj from git master:
>
> git clone https://github.com/bitcoinj/bitcoinj.git
>
> ... and build ....
>
> cd bitcoinj
> mvn -DskipTests package
>
> 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:
>
> ./bitcoind -regtest -connect=0.0.0.0 -listen -whitelist=127.0.0.1
> -datadir=/tmp/pulltester
> java -jar core/target/pull-tests.jar
>
> It should go ahead and print lots of debug spew, then at the end say it's
> happy.
>
> Let me know if you encounter any problems with this.
>
> 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.
>
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
>


-- 
Jeff Garzik
Bitcoin core developer and open source evangelist
BitPay, Inc.      https://bitpay.com/

--90e6ba6e8d9052b66c04ffe3c0cb
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr">I just checked in a change =
to bitcoinj git master that makes it much easier to create a pull tester ja=
r. 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, thi=
s 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 insta=
ll it automatically. Otherwise apt-get or fetch the latest from the interwe=
bs.<br>


<br></li><li>Apache Maven. This is a rough equivalent of autotools, except =
it does dependency resolution for you. Grab it from=C2=A0<a href=3D"http://=
maven.apache.org/download.cgi" target=3D"_blank">http://maven.apache.org/do=
wnload.cgi</a> then unzip it and make sure the bin directory is in your PAT=
H. 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 sho=
uld 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=3D"courier new, monospace">git clone=C2=A0<a href=3D"https:=
//github.com/bitcoinj/bitcoinj.git" target=3D"_blank">https://github.com/bi=
tcoinj/bitcoinj.git</a></font></div>


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


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


<div><br></div><div><font face=3D"courier new, monospace">./bitcoind -regte=
st -connect=3D0.0.0.0 -listen -whitelist=3D127.0.0.1 -datadir=3D/tmp/pullte=
ster</font></div><div><font face=3D"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 a=
t the end say it&#39;s happy.</div><div><br></div><div>Let me know if you e=
ncounter 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 versi=
on 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 loca=
l 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=3D"http://pubads.g.doubleclick.net/gampad/clk?id=3D153845071&amp;iu=
=3D/4140/ostg.clktrk" target=3D"_blank">http://pubads.g.doubleclick.net/gam=
pad/clk?id=3D153845071&amp;iu=3D/4140/ostg.clktrk</a><br>__________________=
_____________________________<br>


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

--90e6ba6e8d9052b66c04ffe3c0cb--