From 4df2e1ef5c20ebd7004a595de7e6a032699106ad Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 22 Jan 2015 00:37:58 +0100 Subject: [PATCH] updated tests --- tests/files/.gitignore | 4 + .../RandomTests/201501151106PYTHON.json | 53 +++++++++++++ .../RandomTests/201501191458PYTHON.json | 31 ++++++++ .../RandomTests/201501191859PYTHON.json | 31 ++++++++ .../RandomTests/201501191953PYTHON.json | 31 ++++++++ tests/files/VMTests/vmSha3Test.json | 58 ++++++++++++++ tests/files/ansible/README.md | 5 ++ tests/files/ansible/Vagrantfile | 78 +++++++++++++++++++ tests/files/ansible/host-config.yml | 8 ++ .../files/ansible/roles/common/tasks/main.yml | 28 +++++++ .../ansible/roles/testrunner/tasks/main.yml | 18 +++++ tests/files/ansible/site.yml | 3 + .../ansible/test-files/docker-cpp/Dockerfile | 32 ++++++++ .../ansible/test-files/docker-go/Dockerfile | 46 +++++++++++ tests/files/ansible/test-files/testrunner.sh | 56 +++++++++++++ tests/files/ansible/testrunner-config.yml | 12 +++ tests/files/index.js | 38 +-------- tests/files/package.json | 5 +- 18 files changed, 502 insertions(+), 35 deletions(-) create mode 100644 tests/files/.gitignore create mode 100644 tests/files/VMTests/RandomTests/201501151106PYTHON.json create mode 100644 tests/files/VMTests/RandomTests/201501191458PYTHON.json create mode 100644 tests/files/VMTests/RandomTests/201501191859PYTHON.json create mode 100644 tests/files/VMTests/RandomTests/201501191953PYTHON.json create mode 100644 tests/files/ansible/README.md create mode 100644 tests/files/ansible/Vagrantfile create mode 100644 tests/files/ansible/host-config.yml create mode 100644 tests/files/ansible/roles/common/tasks/main.yml create mode 100644 tests/files/ansible/roles/testrunner/tasks/main.yml create mode 100644 tests/files/ansible/site.yml create mode 100644 tests/files/ansible/test-files/docker-cpp/Dockerfile create mode 100644 tests/files/ansible/test-files/docker-go/Dockerfile create mode 100755 tests/files/ansible/test-files/testrunner.sh create mode 100644 tests/files/ansible/testrunner-config.yml diff --git a/tests/files/.gitignore b/tests/files/.gitignore new file mode 100644 index 000000000..cdf615a0f --- /dev/null +++ b/tests/files/.gitignore @@ -0,0 +1,4 @@ +venv/ +*~ +*.swp +.vagrant/ diff --git a/tests/files/VMTests/RandomTests/201501151106PYTHON.json b/tests/files/VMTests/RandomTests/201501151106PYTHON.json new file mode 100644 index 000000000..b2b82c46b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501151106PYTHON.json @@ -0,0 +1,53 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "300", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4142414131424043923a58f2", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9940", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4142414131424043923a58f2", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4142414131424043923a58f2", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501191458PYTHON.json b/tests/files/VMTests/RandomTests/201501191458PYTHON.json new file mode 100644 index 000000000..add1fbff5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501191458PYTHON.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "300", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4243434440448143f2a231f1", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4243434440448143f2a231f1", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501191859PYTHON.json b/tests/files/VMTests/RandomTests/201501191859PYTHON.json new file mode 100644 index 000000000..53a0d2da9 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501191859PYTHON.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "300", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4243434244444340f201186211907055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4243434244444340f201186211907055", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201501191953PYTHON.json b/tests/files/VMTests/RandomTests/201501191953PYTHON.json new file mode 100644 index 000000000..2ca16c9ea --- /dev/null +++ b/tests/files/VMTests/RandomTests/201501191953PYTHON.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "currentGasLimit" : "1000000", + "currentNumber" : "300", + "currentTimestamp" : "2", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x434342444041454545045bf2f23a55", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x434342444041454545045bf2f23a55", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/vmSha3Test.json b/tests/files/VMTests/vmSha3Test.json index b9e6b46a1..d9d3c640b 100644 --- a/tests/files/VMTests/vmSha3Test.json +++ b/tests/files/VMTests/vmSha3Test.json @@ -249,5 +249,63 @@ } } } + }, + "sha3_bigOffset" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60027e0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff20600055", + "data" : "0x", + "gas" : "1099511627776", + "gasPrice" : "1", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "115792089237316195423570985008687907853269984665640564039457584007913129639935" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "code" : "0x60027e0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff20600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "sha3_bigSize" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff20600055", + "data" : "0x", + "gas" : "1099511627776", + "gasPrice" : "1", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "115792089237316195423570985008687907853269984665640564039457584007913129639935" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "code" : "0x7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff20600055", + "nonce" : "0", + "storage" : { + } + } + } } } \ No newline at end of file diff --git a/tests/files/ansible/README.md b/tests/files/ansible/README.md new file mode 100644 index 000000000..cef407986 --- /dev/null +++ b/tests/files/ansible/README.md @@ -0,0 +1,5 @@ +# Automatic deployment of the random test generator + +Testing is done in a Vagrant virtual machine + +install vagrant, virtualbox, ansible, then do `vagrant up`. It should provison a basic machine. `vagrant ssh` to verify the machine is working as expected. `vagrant terminate` to reset machine to clean state. diff --git a/tests/files/ansible/Vagrantfile b/tests/files/ansible/Vagrantfile new file mode 100644 index 000000000..ce6ac3dde --- /dev/null +++ b/tests/files/ansible/Vagrantfile @@ -0,0 +1,78 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! +VAGRANTFILE_API_VERSION ||= "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + # All Vagrant configuration is done here. The most common configuration + # options are documented and commented below. For a complete reference, + # please see the online documentation at vagrantup.com. + + # Every Vagrant virtual environment requires a box to build off of. + config.vm.box = "ubuntu/trusty64" + config.vm.define "random-test" + + # Disable automatic box update checking. If you disable this, then + # boxes will only be checked for updates when the user runs + # `vagrant box outdated`. This is not recommended. + # config.vm.box_check_update = false + + # Create a forwarded port mapping which allows access to a specific port + # within the machine from a port on the host machine. In the example below, + # accessing "localhost:8080" will access port 80 on the guest machine. + # config.vm.network "forwarded_port", guest: 80, host: 8080 + + # Create a private network, which allows host-only access to the machine + # using a specific IP. + # config.vm.network "private_network", ip: "192.168.33.10" + + # Create a public network, which generally matched to bridged network. + # Bridged networks make the machine appear as another physical device on + # your network. + # config.vm.network "public_network" + + # If true, then any SSH connections made will enable agent forwarding. + # Default value: false + # config.ssh.forward_agent = true + + # Share an additional folder to the guest VM. The first argument is + # the path on the host to the actual folder. The second argument is + # the path on the guest to mount the folder. And the optional third + # argument is a set of non-required options. + # config.vm.synced_folder "../data", "/vagrant_data" + + # Provider-specific configuration so you can fine-tune various + # backing providers for Vagrant. These expose provider-specific options. + # Example for VirtualBox: + # + # config.vm.provider "virtualbox" do |vb| + # # Don't boot with headless mode + # vb.gui = true + # + # # Use VBoxManage to customize the VM. For example to change memory: + # vb.customize ["modifyvm", :id, "--memory", "1024"] + # end + + + config.vm.provider "virtualbox" do |vb| + # Ubuntu / Virtualbox workaround. + # see http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client + vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + + # cpp client needs a lot of RAM to build + vb.customize ["modifyvm", :id, "--memory", "2048"] + end + + # + # View the documentation for the provider you're using for more + # information on available options. + + + # Ansible + config.vm.provision "ansible" do |ansible| + ansible.playbook = "site.yml" + end + +end + diff --git a/tests/files/ansible/host-config.yml b/tests/files/ansible/host-config.yml new file mode 100644 index 000000000..571cc141e --- /dev/null +++ b/tests/files/ansible/host-config.yml @@ -0,0 +1,8 @@ +--- +- name: Provision the operation system for tests + # testing + hosts: all + # live + # hosts: TDB + roles: + - common diff --git a/tests/files/ansible/roles/common/tasks/main.yml b/tests/files/ansible/roles/common/tasks/main.yml new file mode 100644 index 000000000..3c483ce13 --- /dev/null +++ b/tests/files/ansible/roles/common/tasks/main.yml @@ -0,0 +1,28 @@ +--- +- name: install docker + sudo: true + # install script from https://docs.docker.com/installation/ubuntulinux/ + shell: curl -sSL https://get.docker.com/ubuntu/ | sudo sh + +- name: install package dependencies + sudo: true + apt: name={{ item }} + with_items: + - python-pip + - htop + +- name: install python dependencies + sudo: true + pip: name=docker-py + + +- name: enable docker for standard user + sudo: true + # todo: how to logout after this command, otherwise won't be effective in this play + user: name=vagrant groups=docker append=yes + +- name: checkout test repo + git: + repo: https://github.com/sveneh/tests.git + version: develop + dest: git diff --git a/tests/files/ansible/roles/testrunner/tasks/main.yml b/tests/files/ansible/roles/testrunner/tasks/main.yml new file mode 100644 index 000000000..ce7fd8efa --- /dev/null +++ b/tests/files/ansible/roles/testrunner/tasks/main.yml @@ -0,0 +1,18 @@ +--- +- name: update C++ client + sudo: true + docker_image: + path: git/ansible/test-files/docker-cpp + name: cpp + state: build + +- name: update Go client + sudo: true + docker_image: + path: git/ansible/test-files/docker-go + name: go + state: build + +- name: Run infinite tests (press ^C to stop) + sudo: true + shell: git/ansible/test-files/testrunner.sh diff --git a/tests/files/ansible/site.yml b/tests/files/ansible/site.yml new file mode 100644 index 000000000..cc04daa94 --- /dev/null +++ b/tests/files/ansible/site.yml @@ -0,0 +1,3 @@ +--- +- include: host-config.yml +- include: testrunner-config.yml 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 + diff --git a/tests/files/ansible/testrunner-config.yml b/tests/files/ansible/testrunner-config.yml new file mode 100644 index 000000000..0304883f1 --- /dev/null +++ b/tests/files/ansible/testrunner-config.yml @@ -0,0 +1,12 @@ +--- +- name: preparing and running tests + # testing + hosts: all + # live + # hosts: TBD + + # TODO use the right user for configuring, until credentials set, stay with default vagrant user + # remote_user: ubuntu + + roles: + - testrunner diff --git a/tests/files/index.js b/tests/files/index.js index 99c19aa13..6db56cc55 100644 --- a/tests/files/index.js +++ b/tests/files/index.js @@ -1,36 +1,6 @@ module.exports = { - blockgenesis: require('./BasicTests/blockgenesistest'), - genesishashes: require('./BasicTests/genesishashestest'), - hexencode: require('./BasicTests/hexencodetest'), - keyaddrtests: require('./BasicTests/keyaddrtest'), - rlptest: require('./BasicTests/rlptest'), - trieTests: { - trietest: require('./TrieTests/trietest'), - trietestnextprev: require('./TrieTests/trietestnextprev'), - trieanyorder: require('./TrieTests/trieanyorder') - }, - txtest: require('./BasicTests/txtest'), - StateTests: { - stExample: require('./StateTests/stExample.json'), - stInitCodeTest: require('./StateTests/stInitCodeTest.json'), - stLogTests: require('./StateTests/stLogTests.json'), - stPreCompiledContracts: require('./StateTests/stPreCompiledContracts'), - stRecursiveCreate: require('./StateTests/stRecursiveCreate'), - stRefundTest: require('./StateTests/stRefundTest'), - stSpecial: require('./StateTests/stSpecialTest'), - stSystemOperationsTest: require('./StateTests/stSystemOperationsTest'), - stTransactionTest: require('./StateTests/stTransactionTest') - }, - VMTests: { - vmRandom: require('./VMTests/RandomTests/randomTest'), - vmArithmeticTest: require('./VMTests/vmArithmeticTest'), - vmBitwiseLogicOperationTest: require('./VMTests/vmBitwiseLogicOperationTest'), - vmBlockInfoTest: require('./VMTests/vmBlockInfoTest'), - vmEnvironmentalInfoTest: require('./VMTests/vmEnvironmentalInfoTest'), - vmIOandFlowOperationsTest: require('./VMTests/vmIOandFlowOperationsTest'), - vmLogTest: require('./VMTests/vmLogTest'), - vmPushDupSwapTest: require('./VMTests/vmPushDupSwapTest'), - vmSha3Test: require('./VMTests/vmSha3Test'), - vmtests: require('./VMTests/vmtests') - } + basicTests: require('require-all')(__dirname + '/BasicTests/'), + trieTests: require('require-all')(__dirname + '/TrieTests/'), + stateTests: require('require-all')(__dirname + '/StateTests/'), + vmTests: require('require-all')(__dirname + '/VMTests') }; diff --git a/tests/files/package.json b/tests/files/package.json index eb0841450..c066bd1b5 100644 --- a/tests/files/package.json +++ b/tests/files/package.json @@ -19,5 +19,8 @@ "bugs": { "url": "https://github.com/ethereum/tests/issues" }, - "homepage": "https://github.com/ethereum/tests" + "homepage": "https://github.com/ethereum/tests", + "dependencies": { + "require-all": "^1.0.0" + } } -- GitLab