aboutsummaryrefslogtreecommitdiffstats
path: root/tests/files/ansible/test-files
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-13 22:05:56 +0800
committerobscuren <geffobscura@gmail.com>2015-02-13 22:05:56 +0800
commita5ea21cd85530eee6eb1bb83c37c20d009f11f74 (patch)
treee5be5bd595139ff7dfbe6261e1e659d8e7dd6f9c /tests/files/ansible/test-files
parentdb24fb792cf0dab91bc85e79aecf6758349002a4 (diff)
parent38faf2c51a1e4a86cda5dfa1b4f7fdae4fd7f58d (diff)
downloadgo-tangerine-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar
go-tangerine-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar.gz
go-tangerine-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar.bz2
go-tangerine-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar.lz
go-tangerine-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar.xz
go-tangerine-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar.zst
go-tangerine-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.zip
merge
Diffstat (limited to 'tests/files/ansible/test-files')
-rw-r--r--tests/files/ansible/test-files/docker-cpp/Dockerfile32
-rw-r--r--tests/files/ansible/test-files/docker-cppjit/Dockerfile44
-rw-r--r--tests/files/ansible/test-files/docker-go/Dockerfile46
-rw-r--r--tests/files/ansible/test-files/docker-python/Dockerfile14
-rwxr-xr-xtests/files/ansible/test-files/testrunner.sh55
5 files changed, 191 insertions, 0 deletions
diff --git a/tests/files/ansible/test-files/docker-cpp/Dockerfile b/tests/files/ansible/test-files/docker-cpp/Dockerfile
new file mode 100644
index 000000000..a3b0e4ca6
--- /dev/null
+++ b/tests/files/ansible/test-files/docker-cpp/Dockerfile
@@ -0,0 +1,32 @@
+# adjusted from https://github.com/ethereum/cpp-ethereum/blob/develop/docker/Dockerfile
+FROM ubuntu:14.04
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update
+RUN apt-get upgrade -y
+
+# Ethereum dependencies
+RUN apt-get install -qy build-essential g++-4.8 git cmake libboost-all-dev libcurl4-openssl-dev wget
+RUN apt-get install -qy automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons
+RUN apt-get install -qy libjsoncpp-dev libargtable2-dev
+
+# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 )
+RUN apt-get install -qy libncurses5-dev
+
+# Qt-based GUI
+# RUN apt-get install -qy qtbase5-dev qt5-default qtdeclarative5-dev libqt5webkit5-dev
+
+# Ethereum PPA
+RUN apt-get install -qy software-properties-common
+RUN add-apt-repository ppa:ethereum/ethereum
+RUN apt-get update
+RUN apt-get install -qy libcryptopp-dev libjson-rpc-cpp-dev
+
+# Build Ethereum (HEADLESS)
+RUN git clone --depth=1 --branch develop https://github.com/ethereum/cpp-ethereum
+RUN mkdir -p cpp-ethereum/build
+RUN cd cpp-ethereum/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DHEADLESS=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install
+RUN ldconfig
+
+ENTRYPOINT ["/cpp-ethereum/build/test/createRandomTest"]
+
diff --git a/tests/files/ansible/test-files/docker-cppjit/Dockerfile b/tests/files/ansible/test-files/docker-cppjit/Dockerfile
new file mode 100644
index 000000000..7b4416cb8
--- /dev/null
+++ b/tests/files/ansible/test-files/docker-cppjit/Dockerfile
@@ -0,0 +1,44 @@
+# adjusted from https://github.com/ethereum/cpp-ethereum/blob/develop/docker/Dockerfile
+FROM ubuntu:14.04
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update
+RUN apt-get upgrade -y
+
+# Ethereum dependencies
+RUN apt-get install -qy build-essential g++-4.8 git cmake libboost-all-dev libcurl4-openssl-dev wget
+RUN apt-get install -qy automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons
+RUN apt-get install -qy libjsoncpp-dev libargtable2-dev
+
+# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 )
+RUN apt-get install -qy libncurses5-dev
+
+# Qt-based GUI
+# RUN apt-get install -qy qtbase5-dev qt5-default qtdeclarative5-dev libqt5webkit5-dev
+
+RUN sudo apt-get -y install software-properties-common
+
+# LLVM-3.5
+RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
+RUN echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.5 main\ndeb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.5 main" > /etc/apt/sources.list.d/llvm-trusty.list
+RUN apt-get update
+RUN apt-get install -qy llvm-3.5 libedit-dev
+
+# Fix llvm-3.5 cmake paths
+RUN mkdir -p /usr/lib/llvm-3.5/share/llvm && ln -s /usr/share/llvm-3.5/cmake /usr/lib/llvm-3.5/share/llvm/cmake
+
+
+# Ethereum PPA
+RUN apt-get install -qy software-properties-common
+RUN add-apt-repository ppa:ethereum/ethereum
+RUN apt-get update
+RUN apt-get install -qy libcryptopp-dev libjson-rpc-cpp-dev
+
+# Build Ethereum (HEADLESS)
+RUN git clone --depth=1 --branch develop https://github.com/ethereum/cpp-ethereum
+RUN mkdir -p cpp-ethereum/build
+RUN cd cpp-ethereum/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DHEADLESS=1 -DEVMJIT=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install
+RUN ldconfig
+
+ENTRYPOINT ["/cpp-ethereum/build/test/checkRandomTest"]
+
diff --git a/tests/files/ansible/test-files/docker-go/Dockerfile b/tests/files/ansible/test-files/docker-go/Dockerfile
new file mode 100644
index 000000000..2302518f3
--- /dev/null
+++ b/tests/files/ansible/test-files/docker-go/Dockerfile
@@ -0,0 +1,46 @@
+# Adjusted from https://github.com/ethereum/go-ethereum/blob/develop/Dockerfile
+FROM ubuntu:14.04
+
+## Environment setup
+ENV HOME /root
+ENV GOPATH /root/go
+ENV PATH /go/bin:/root/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
+
+RUN mkdir -p /root/go
+ENV DEBIAN_FRONTEND noninteractive
+
+## Install base dependencies
+RUN apt-get update && apt-get upgrade -y
+RUN apt-get install -y git mercurial build-essential software-properties-common pkg-config libgmp3-dev libreadline6-dev libpcre3-dev libpcre++-dev
+
+## Build and install Go
+RUN hg clone -u release https://code.google.com/p/go
+RUN cd go && hg update go1.4
+RUN cd go/src && ./make.bash && go version
+
+## Install GUI dependencies
+RUN add-apt-repository ppa:ubuntu-sdk-team/ppa -y
+RUN apt-get update -y
+RUN apt-get install -y qtbase5-private-dev qtdeclarative5-private-dev libqt5opengl5-dev
+
+## Fetch and install serpent-go
+RUN go get -v -d github.com/ethereum/serpent-go
+WORKDIR $GOPATH/src/github.com/ethereum/serpent-go
+# RUN git checkout master
+RUN git submodule update --init
+RUN go install -v
+
+# Fetch and install go-ethereum
+RUN go get -v -d github.com/ethereum/go-ethereum/...
+WORKDIR $GOPATH/src/github.com/ethereum/go-ethereum
+
+RUN git checkout develop
+
+RUN git pull
+RUN ETH_DEPS=$(go list -f '{{.Imports}} {{.TestImports}} {{.XTestImports}}' github.com/ethereum/go-ethereum/... | sed -e 's/\[//g' | sed -e 's/\]//g' | sed -e 's/C //g'); if [ "$ETH_DEPS" ]; then go get $ETH_DEPS; fi
+RUN go install -v ./cmd/ethtest
+
+# Run JSON RPC
+ENTRYPOINT ["ethtest"]
+EXPOSE 8080
+
diff --git a/tests/files/ansible/test-files/docker-python/Dockerfile b/tests/files/ansible/test-files/docker-python/Dockerfile
new file mode 100644
index 000000000..0265f120b
--- /dev/null
+++ b/tests/files/ansible/test-files/docker-python/Dockerfile
@@ -0,0 +1,14 @@
+FROM sveneh/pyethereum-base
+
+RUN git clone --branch master https://github.com/ethereum/pyethereum.git
+
+RUN cd pyethereum && curl https://bootstrap.pypa.io/bootstrap-buildout.py | python
+
+RUN cd pyethereum && bin/buildout
+
+#default port for incoming requests
+EXPOSE 30303
+
+WORKDIR /pyethereum/bin
+
+ENTRYPOINT ["./python", "../tests/test_vm.py"]
diff --git a/tests/files/ansible/test-files/testrunner.sh b/tests/files/ansible/test-files/testrunner.sh
new file mode 100755
index 000000000..5d7779109
--- /dev/null
+++ b/tests/files/ansible/test-files/testrunner.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+# create random virtual machine test
+#cd ~/software/Ethereum/pyethereum (python has local dependencies so only works from within the directory)
+cd ~
+while [ 1 ]
+do
+ TEST="$(docker run --rm --entrypoint="/cpp-ethereum/build/test/createRandomTest" cppjit)"
+ # echo "$TEST"
+
+ # test pyethereum
+ #OUTPUT_PYTHON="$(python ./tests/test_vm.py "$TEST")"
+ #RESULT_PYTHON=$?
+
+ # test go
+ OUTPUT_GO="$(docker run --rm go "$TEST")"
+ RESULT_GO=$?
+
+ # test cpp-jit
+ OUTPUT_CPPJIT="$(docker run --rm cppjit "$TEST")"
+ RESULT_CPPJIT=$?
+
+ # go fails
+ if [ "$RESULT_GO" -ne 0 ]; then
+ echo Failed:
+ echo Output_GO:
+ echo $OUTPUT_GO
+ echo Test:
+ echo "$TEST"
+ echo "$TEST" > FailedTest.json
+ mv FailedTest.json $(date -d "today" +"%Y%m%d%H%M")GO.json # replace with scp to central server
+ fi
+
+ # python fails
+ #if [ "$RESULT_PYTHON" -ne 0 ]; then
+ # echo Failed:
+ # echo Output_PYTHON:
+ # echo $OUTPUT_PYTHON
+ # echo Test:
+ # echo "$TEST"
+ # echo "$TEST" > FailedTest.json
+ # mv FailedTest.json $(date -d "today" +"%Y%m%d%H%M")PYTHON.json
+ #fi
+
+ # cppjit fails
+ if [ "$RESULT_CPPJIT" -ne 0 ]; then
+ echo Failed:
+ echo Output_CPPJIT:
+ echo $OUTPUT_CPPJIT
+ echo Test:
+ echo "$TEST"
+ echo "$TEST" > FailedTest.json
+ mv FailedTest.json $(date -d "today" +"%Y%m%d%H%M")CPPJIT.json
+ fi
+done