Skip to content

Commit

Permalink
Refactored state test thingy a bit, added config support
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Aug 29, 2017
1 parent 13f00b6 commit 3beb358
Show file tree
Hide file tree
Showing 5 changed files with 244,870 additions and 172 deletions.
18 changes: 15 additions & 3 deletions containers/buildandpushall.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/bin/bash
#(cd geth && docker build --no-cache . -t holiman/gethvm && docker push holiman/gethvm)
#(cd parity && docker build --no-cache . -t holiman/parityvm && docker push holiman/parityvm)
(cd testeth && docker build --no-cache . -t holiman/testeth && docker push holiman/testeth)

docker_repo="holiman"
#docker_repo="cdetrio"

#(cd geth && docker build --no-cache . -t $docker_repo/gethvm && docker push $docker_repo/gethvm)
#(cd parity && docker build --no-cache . -t $docker_repo/parityvm && docker push $docker_repo/parityvm)
#(cd testeth && docker build --no-cache . -t $docker_repo/testeth && docker push $docker_repo/testeth)

# build geth docker image
(cd std-geth && docker build --no-cache . -t $docker_repo/std-gethvm)
# build cpp docker image
(cd std-cpp-ethereum && docker build --no-cache . -t $docker_repo/std-cppvm )
# build parity docker image
(cd std-parity && docker build --no-cache . -t $docker_repo/std-parityvm)
# build python docker image
(cd pyethereum && docker build --no-cache . -t $docker_repo/std-pyethvm)
54 changes: 54 additions & 0 deletions containers/cpp-ethereum/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Docker container spec for building the develop branch of cpp-ethereum.
#
# The build process it potentially longer running but every effort was made to
# produce a very minimalistic container that can be reused many times without
# needing to constantly rebuild.
#
# This image is based on
# https://github.com/ethereum/cpp-ethereum/blob/ccac1dd777c5b25de1c0bacc72dbecb6b376689e/scripts/docker/eth-alpine/Dockerfile

FROM alpine

# Make sure bash, bc and jq is available for easier wrapper implementation
RUN apk add --no-cache \
bash jq bc \
libstdc++ \
gmp \
libcurl \
libmicrohttpd \
leveldb --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
&& apk add --no-cache --virtual .build-deps \
git \
cmake \
g++ \
make \
linux-headers curl-dev libmicrohttpd-dev \
leveldb-dev --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
&& sed -i -E -e 's|#warning|//#warning|' /usr/include/sys/poll.h \
&& git clone --recursive https://github.com/ethereum/cpp-ethereum --branch develop --single-branch --depth 1 \
&& cd cpp-ethereum && echo "{}" \
| jq ".+ {\"repo\":\"$(git config --get remote.origin.url)\"}" \
| jq ".+ {\"branch\":\"$(git rev-parse --abbrev-ref HEAD)\"}" \
| jq ".+ {\"commit\":\"$(git rev-parse HEAD)\"}" \
> /version.json \
&& mkdir /build && cd /build \
&& cmake /cpp-ethereum -DCMAKE_BUILD_TYPE=RelWithDebInfo -DTOOLS=Off -DTESTS=Off \
&& make eth \
&& make install \
&& cd / && rm /build -rf \
&& rm /cpp-ethereum -rf \
&& apk del .build-deps \
&& rm /var/cache/apk/* -f

# See https://github.com/ethereum/cpp-ethereum/issues/3300
# Using more than j4 can cause failures randomly

ADD config.json /config.json

# Inject the startup script
ADD eth.sh /eth.sh
RUN chmod +x /eth.sh
# Export the usual networking ports to allow outside access to the node
EXPOSE 8545 30303

ENTRYPOINT ["/eth.sh"]
24 changes: 24 additions & 0 deletions statetests.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[DEFAULT]

fork_config = EIP158
clients = CPP,GETH,PAR,PY
tests_path = /ethereum/tests
prestate_tmp_file = prestate.json
single_test_tmp_file = single_test_tmp.json
logs_path = tracerLogs

docker_repo= cdetrio
pyeth_docker_name = %(docker_repo)s/pyethereum
cpp_docker_name = %(docker_repo)s/cpp-ethereum
parity_docker_name= %(docker_repo)s/parity
geth_docker_name = %(docker_repo)s/geth

[martin]

docker_repo= holiman
pyeth_docker_name = %(docker_repo)s/std-pyethvm
cpp_docker_name = %(docker_repo)s/std-cppvm
parity_docker_name= %(docker_repo)s/std-parityvm
geth_docker_name = %(docker_repo)s/std-gethvm
tests_path=/data/workspace/tests

Loading

0 comments on commit 3beb358

Please sign in to comment.