aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/tests.sh
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-13 18:54:22 +0800
committerchriseth <chris@ethereum.org>2018-02-23 20:13:48 +0800
commitb80baa80021b993ba21f3afe041d5cd0fc9b015b (patch)
treee581a2e3ef9f4e6771c8aeef889b0d930650142d /scripts/tests.sh
parentcae6cc2c3378815e9ed488b7ac0e126cd1bf9630 (diff)
downloaddexon-solidity-b80baa80021b993ba21f3afe041d5cd0fc9b015b.tar.gz
dexon-solidity-b80baa80021b993ba21f3afe041d5cd0fc9b015b.tar.zst
dexon-solidity-b80baa80021b993ba21f3afe041d5cd0fc9b015b.zip
Run EndToEnd tests on circle, too.
Diffstat (limited to 'scripts/tests.sh')
-rwxr-xr-xscripts/tests.sh30
1 files changed, 25 insertions, 5 deletions
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 <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