Run EndToEnd tests on circle, too.

This commit is contained in:
chriseth 2018-02-13 11:54:22 +01:00
parent cae6cc2c33
commit b80baa8002
2 changed files with 28 additions and 14 deletions

View File

@ -93,7 +93,7 @@ jobs:
name: Install build dependencies
command: |
apt-get -qq update
apt-get -qy install ccache cmake libboost-all-dev libz3-dev
apt-get -qy install ccache cmake libboost-all-dev libz3-dev libleveldb1v5
- run:
name: Init submodules
command: |
@ -114,16 +114,10 @@ jobs:
key: ccache-{{ arch }}-{{ .Branch }}
paths:
- ~/.ccache
- run:
name: Commandline tests
command: test/cmdlineTests.sh
- run: mkdir -p test_results
- run:
name: Test without optimizer (exclude IPC tests)
command: build/test/soltest --logger=JUNIT,test_suite,test_results/no_opt.xml -- --no-ipc
- run:
name: Test with optimizer (exclude IPC tests)
command: build/test/soltest --logger=JUNIT,test_suite,test_results/opt.xml -- --optimize --no-ipc
name: Tests
command: scripts/tests.sh --junit_report test_results
- store_test_results:
path: test_results/
- store_artifacts:

View File

@ -30,6 +30,20 @@ set -e
REPO_ROOT="$(dirname "$0")"/..
if [ "$1" = --junit_report ]
then
if [ -z "$2" ]
then
echo "Usage: $0 [--junit_report <report_directory>]"
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