From b80baa80021b993ba21f3afe041d5cd0fc9b015b Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 13 Feb 2018 11:54:22 +0100 Subject: Run EndToEnd tests on circle, too. --- scripts/tests.sh | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/tests.sh b/scripts/tests.sh index 2b47c254..d414643b 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -30,6 +30,20 @@ set -e REPO_ROOT="$(dirname "$0")"/.. +if [ "$1" = --junit_report ] +then + if [ -z "$2" ] + then + echo "Usage: $0 [--junit_report ]" + exit 1 + fi + testargs_no_opt="--logger=JUNIT,test_suite,$2/no_opt.xml" + testargs_opt="--logger=JUNIT,test_suite,$2/opt.xml" +else + testargs_no_opt='' + testargs_opt='' +fi + echo "Running commandline tests..." "$REPO_ROOT/test/cmdlineTests.sh" @@ -42,9 +56,15 @@ elif [ -z $CI ]; then ETH_PATH="eth" else mkdir -p /tmp/test - # Update hash below if binary is changed. - wget -q -O /tmp/test/eth https://github.com/ethereum/cpp-ethereum/releases/download/solidityTester/eth_byzantium2 - test "$(shasum /tmp/test/eth)" = "4dc3f208475f622be7c8e53bee720e14cd254c6f /tmp/test/eth" + ETH_BINARY=eth_byzantium_artful + ETH_HASH="e527dd3e3dc17b983529dd7dcfb74a0d3a5aed4e" + if grep -i trusty /etc/lsb-release >/dev/null 2>&1 + then + ETH_BINARY=eth_byzantium2 + ETH_HASH="4dc3f208475f622be7c8e53bee720e14cd254c6f" + fi + wget -q -O /tmp/test/eth https://github.com/ethereum/cpp-ethereum/releases/download/solidityTester/$ETH_BINARY + test "$(shasum /tmp/test/eth)" = "$ETH_HASH /tmp/test/eth" sync chmod +x /tmp/test/eth sync # Otherwise we might get a "text file busy" error @@ -68,9 +88,9 @@ sleep 2 # And then run the Solidity unit-tests (once without optimization, once with), # pointing to that IPC endpoint. echo "--> Running tests without optimizer..." - "$REPO_ROOT"/build/test/soltest --show-progress -- --ipcpath /tmp/test/geth.ipc && \ + "$REPO_ROOT"/build/test/soltest --show-progress $testargs_no_opt -- --ipcpath /tmp/test/geth.ipc && \ echo "--> Running tests WITH optimizer..." && \ - "$REPO_ROOT"/build/test/soltest --show-progress -- --optimize --ipcpath /tmp/test/geth.ipc + "$REPO_ROOT"/build/test/soltest --show-progress $testargs_opt -- --optimize --ipcpath /tmp/test/geth.ipc ERROR_CODE=$? pkill "$ETH_PID" || true sleep 4 -- cgit v1.2.3