diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-22 07:37:58 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-22 07:37:58 +0800 |
commit | 4df2e1ef5c20ebd7004a595de7e6a032699106ad (patch) | |
tree | 9b9f06036d2d0fa7771f69aaf29c011628346816 /tests/files/ansible/test-files | |
parent | 67f9783e6a0fa5613a031e05549b92adbee57399 (diff) | |
download | go-tangerine-4df2e1ef5c20ebd7004a595de7e6a032699106ad.tar go-tangerine-4df2e1ef5c20ebd7004a595de7e6a032699106ad.tar.gz go-tangerine-4df2e1ef5c20ebd7004a595de7e6a032699106ad.tar.bz2 go-tangerine-4df2e1ef5c20ebd7004a595de7e6a032699106ad.tar.lz go-tangerine-4df2e1ef5c20ebd7004a595de7e6a032699106ad.tar.xz go-tangerine-4df2e1ef5c20ebd7004a595de7e6a032699106ad.tar.zst go-tangerine-4df2e1ef5c20ebd7004a595de7e6a032699106ad.zip |
updated tests
Diffstat (limited to 'tests/files/ansible/test-files')
-rw-r--r-- | tests/files/ansible/test-files/docker-cpp/Dockerfile | 32 | ||||
-rw-r--r-- | tests/files/ansible/test-files/docker-go/Dockerfile | 46 | ||||
-rwxr-xr-x | tests/files/ansible/test-files/testrunner.sh | 56 |
3 files changed, 134 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-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/testrunner.sh b/tests/files/ansible/test-files/testrunner.sh new file mode 100755 index 000000000..2c9608dd4 --- /dev/null +++ b/tests/files/ansible/test-files/testrunner.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +# create random virtual machine test +#cd ~/software/Ethereum/pyethereum (python has local dependencies so only works from within the directory) +while [ 1 ] +do + TEST="$(docker run --rm cpp)" + # 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="$(~/software/Ethereum/cpp-ethereum/build/test/checkRandomTest "$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 + |