Update Colony, Gnosis and OpenZeppelin external tests to run on updated 0.7.x branches from solidity-external-tests

This commit is contained in:
Kamil Śliwak 2020-11-27 18:12:08 +01:00
parent 45c506a4ff
commit e05241adfc
6 changed files with 13 additions and 18 deletions

View File

@ -884,7 +884,7 @@ jobs:
t_ems_compile_ext_colony: t_ems_compile_ext_colony:
docker: docker:
- image: circleci/node:10 - image: circleci/node:12
environment: environment:
TERM: xterm TERM: xterm
steps: steps:
@ -903,7 +903,7 @@ jobs:
t_ems_test_ext_colony: t_ems_test_ext_colony:
docker: docker:
- image: circleci/node:10 - image: circleci/node:12
environment: environment:
TERM: xterm TERM: xterm
steps: steps:

View File

@ -33,12 +33,12 @@ function colony_test
OPTIMIZER_LEVEL=3 OPTIMIZER_LEVEL=3
CONFIG="truffle.js" CONFIG="truffle.js"
truffle_setup "$SOLJSON" https://github.com/solidity-external-tests/colonyNetwork.git develop_070 truffle_setup "$SOLJSON" https://github.com/solidity-external-tests/colonyNetwork.git develop_070_new
run_install "$SOLJSON" install_fn run_install "$SOLJSON" install_fn
cd lib cd lib
rm -Rf dappsys rm -Rf dappsys
git clone https://github.com/solidity-external-tests/dappsys-monolithic.git -b master_060 dappsys git clone https://github.com/solidity-external-tests/dappsys-monolithic.git -b master_070 dappsys
cd .. cd ..
truffle_run_test "$SOLJSON" compile_fn test_fn truffle_run_test "$SOLJSON" compile_fn test_fn

View File

@ -109,13 +109,6 @@ function replace_version_pragmas
find . test -name '*.sol' -type f -print0 | xargs -0 sed -i -E -e 's/pragma solidity [^;]+;/pragma solidity >=0.0;/' find . test -name '*.sol' -type f -print0 | xargs -0 sed -i -E -e 's/pragma solidity [^;]+;/pragma solidity >=0.0;/'
} }
function replace_libsolc_call
{
# Change "compileStandard" to "compile" (needed for pre-5.x Truffle)
printLog "Replacing libsolc compile call in Truffle..."
sed -i s/solc.compileStandard/solc.compile/ "node_modules/truffle/build/cli.bundled.js"
}
function find_truffle_config function find_truffle_config
{ {
local config_file="truffle.js" local config_file="truffle.js"

View File

@ -38,6 +38,9 @@ function ens_test
# Use latest Truffle. Older versions crash on the output from 0.8.0. # Use latest Truffle. Older versions crash on the output from 0.8.0.
force_truffle_version ^5.1.55 force_truffle_version ^5.1.55
# Remove the lock file (if it exists) to prevent it from overriding our changes in package.json
rm -f package-lock.json
run_install "$SOLJSON" install_fn run_install "$SOLJSON" install_fn
truffle_run_test "$SOLJSON" compile_fn test_fn truffle_run_test "$SOLJSON" compile_fn test_fn

View File

@ -31,17 +31,16 @@ function test_fn { npm test; }
function gnosis_safe_test function gnosis_safe_test
{ {
OPTIMIZER_LEVEL=1 OPTIMIZER_LEVEL=1
CONFIG="truffle.js" CONFIG="truffle-config.js"
truffle_setup "$SOLJSON" https://github.com/solidity-external-tests/safe-contracts.git development_070 truffle_setup "$SOLJSON" https://github.com/solidity-external-tests/safe-contracts.git development_070_new
force_truffle_version ^5.0.42 sed -i 's|github:gnosis/mock-contract#sol_0_5_0|github:solidity-external-tests/mock-contract#master_070_new|g' package.json
sed -i 's|github:gnosis/mock-contract#sol_0_5_0|github:solidity-external-tests/mock-contract#master_070|g' package.json
# Remove the lock file (if it exists) to prevent it from overriding our changes in package.json
rm -f package-lock.json rm -f package-lock.json
rm -rf node_modules/
run_install "$SOLJSON" install_fn run_install "$SOLJSON" install_fn
replace_libsolc_call
truffle_run_test "$SOLJSON" compile_fn test_fn truffle_run_test "$SOLJSON" compile_fn test_fn
} }

View File

@ -33,7 +33,7 @@ function zeppelin_test
OPTIMIZER_LEVEL=1 OPTIMIZER_LEVEL=1
CONFIG="truffle-config.js" CONFIG="truffle-config.js"
truffle_setup "$SOLJSON" https://github.com/solidity-external-tests/openzeppelin-contracts.git upgrade-0.7.0 truffle_setup "$SOLJSON" https://github.com/solidity-external-tests/openzeppelin-contracts.git master_070
run_install "$SOLJSON" install_fn run_install "$SOLJSON" install_fn
truffle_run_test "$SOLJSON" compile_fn test_fn truffle_run_test "$SOLJSON" compile_fn test_fn