diff options
author | chriseth <chris@ethereum.org> | 2018-02-23 00:21:26 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-03-02 00:19:35 +0800 |
commit | f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4 (patch) | |
tree | 80555ec0e8139a30bfd7bc83cc1acf811eada487 /scripts | |
parent | 83515eadcf21decc9355c69c621c4d530a62b04e (diff) | |
download | dexon-solidity-f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4.tar dexon-solidity-f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4.tar.gz dexon-solidity-f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4.tar.bz2 dexon-solidity-f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4.tar.lz dexon-solidity-f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4.tar.xz dexon-solidity-f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4.tar.zst dexon-solidity-f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4.zip |
Test both EVM versions.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/tests.sh | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/scripts/tests.sh b/scripts/tests.sh index 3c80adc5..69b2b338 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -37,11 +37,9 @@ 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" + log_directory="$2" else - testargs_no_opt='' - testargs_opt='' + log_directory="" fi echo "Running commandline tests..." @@ -98,10 +96,31 @@ then progress="" fi -echo "--> Running tests without optimizer..." -"$REPO_ROOT"/build/test/soltest $testargs_no_opt $progress -- --ipcpath /tmp/test/geth.ipc -echo "--> Running tests WITH optimizer..." -"$REPO_ROOT"/build/test/soltest $testargs_opt $progress -- --optimize --ipcpath /tmp/test/geth.ipc +ERROR_CODE=0 +# And then run the Solidity unit-tests in the matrix combination of optimizer / no optimizer +# and homestead / byzantium VM, # pointing to that IPC endpoint. +for optimize in "" "--optimize" +do + for vm in homestead byzantium + do + echo "--> Running tests using "$optimize" --evm-version "$vm"..." + log="" + if [ -n "$log_directory" ] + then + if [ -n "$optimize" ] + then + log=--logger=JUNIT,test_suite,$log_directory/opt_$vm.xml $testargs + else + log=--logger=JUNIT,test_suite,$log_directory/noopt_$vm.xml $testargs_no_opt + fi + fi + set +e + "$REPO_ROOT"/build/test/soltest $progress $log -- "$optimize" --evm-version "$vm" --ipcpath /tmp/test/geth.ipc + THIS_ERR=$? + set -e + if [ $? -ne 0 ]; then ERROR_CODE=$?; fi + done +done wait $CMDLINE_PID |