Merge pull request #47 from nicksavers/master

Support for Coveralls (code coverage)
This commit is contained in:
romanman 2014-07-01 14:52:51 +01:00
commit 82072c5520
6 changed files with 41 additions and 7 deletions

1
.coveralls.yml Normal file
View File

@ -0,0 +1 @@
service_name: travis-ci

View File

@ -1 +1,4 @@
language: java language: java
after_success:
- mvn clean antlr4:antlr4 cobertura:cobertura coveralls:cobertura

View File

@ -1,5 +1,5 @@
# Ethereum Java Implementation [![Build Status](https://travis-ci.org/ethereum/ethereumj.svg?branch=master)](https://travis-ci.org/ethereum/ethereumj) # Ethereum Java Implementation
[![Build Status](https://travis-ci.org/ethereum/ethereumj.svg?branch=master)](https://travis-ci.org/ethereum/ethereumj) [![Coverage Status](https://coveralls.io/repos/ethereum/ethereumj/badge.png?branch=master)](https://coveralls.io/r/ethereum/ethereumj?branch=master)
:small_orange_diamond: By **Roman Mandeleil** @romanman 2014. :small_orange_diamond: By **Roman Mandeleil** @romanman 2014.
* Based on a design by **Vitalik Buterin** @vbuterin. * Based on a design by **Vitalik Buterin** @vbuterin.

View File

@ -16,6 +16,21 @@
mvn antlr4:antlr4 mvn antlr4:antlr4
--> -->
<developers>
<developer>
<name>Roman Mandeleil</name>
</developer>
<developer>
<name>Nick Savers</name>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/ethereum/ethereumj.git</connection>
<developerConnection>scm:git:git://github.com/ethereum/ethereumj.git</developerConnection>
<url>https://github.com/ethereum/ethereumj</url>
</scm>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Third-party dependencies --> <!-- Third-party dependencies -->
@ -221,6 +236,22 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>2.2.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<format>xml</format>
<maxmem>256m</maxmem>
<!-- aggregated reports for multi-module projects -->
<aggregate>true</aggregate>
</configuration>
</plugin>
<plugin> <plugin>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version> <version>1.3</version>

View File

@ -1,7 +1,6 @@
package org.ethereum.gui; package org.ethereum.gui;
import org.ethereum.core.Transaction; import org.ethereum.core.Transaction;
import org.ethereum.manager.MainData;
import org.ethereum.manager.WorldManager; import org.ethereum.manager.WorldManager;
import org.ethereum.net.submit.TransactionExecutor; import org.ethereum.net.submit.TransactionExecutor;
import org.ethereum.net.submit.TransactionTask; import org.ethereum.net.submit.TransactionTask;
@ -22,7 +21,7 @@ import static org.ethereum.config.SystemProperties.CONFIG;
* @author: Roman Mandeleil * @author: Roman Mandeleil
* Created on: 26/05/2014 12:27 * Created on: 26/05/2014 12:27
*/ */
public class DialogWorker extends SwingWorker { public class DialogWorker extends SwingWorker<Transaction, Object> {
private static Logger logger = LoggerFactory.getLogger(DialogWorker.class); private static Logger logger = LoggerFactory.getLogger(DialogWorker.class);
@ -35,7 +34,7 @@ public class DialogWorker extends SwingWorker {
} }
@Override @Override
protected Object doInBackground() throws Exception { protected Transaction doInBackground() throws Exception {
TransactionTask transactionTask = new TransactionTask(tx); TransactionTask transactionTask = new TransactionTask(tx);
Future<Transaction> future = TransactionExecutor.instance.submitTransaction(transactionTask); Future<Transaction> future = TransactionExecutor.instance.submitTransaction(transactionTask);
dialog.infoStatusMsg("Transaction sent to the network, waiting for approve"); dialog.infoStatusMsg("Transaction sent to the network, waiting for approve");

View File

@ -29,7 +29,7 @@ public class StaticMessages {
byte[] peerIdBytes = HashUtil.randomPeerId(); byte[] peerIdBytes = HashUtil.randomPeerId();
return new HelloMessage((byte) 0x14, (byte) 0x00, return new HelloMessage((byte) 0x14, (byte) 0x00,
"EthereumJ [v0.5.1] by RomanJ", (byte) 0b00000111, "EthereumJ [v0.5.1] by RomanJ", Byte.parseByte("00000111", 2),
(short) 30303, peerIdBytes); (short) 30303, peerIdBytes);
} }
} }