mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
external test scripts: Replace global $FORCE_ABIv2 variable with a parameter
This commit is contained in:
parent
a6921bc39b
commit
fcf0538224
@ -31,7 +31,6 @@ function test_fn { yarn run test:contracts; }
|
|||||||
function colony_test
|
function colony_test
|
||||||
{
|
{
|
||||||
OPTIMIZER_LEVEL=3
|
OPTIMIZER_LEVEL=3
|
||||||
FORCE_ABIv2=false
|
|
||||||
CONFIG="truffle.js"
|
CONFIG="truffle.js"
|
||||||
|
|
||||||
truffle_setup https://github.com/solidity-external-tests/colonyNetwork.git develop_070
|
truffle_setup https://github.com/solidity-external-tests/colonyNetwork.git develop_070
|
||||||
@ -42,7 +41,7 @@ function colony_test
|
|||||||
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_060 dappsys
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
truffle_run_test compile_fn test_fn
|
truffle_run_test compile_fn test_fn "NO-FORCE-ABI-V2"
|
||||||
}
|
}
|
||||||
|
|
||||||
external_test ColonyNetworks colony_test
|
external_test ColonyNetworks colony_test
|
||||||
|
@ -234,6 +234,9 @@ function truffle_run_test
|
|||||||
{
|
{
|
||||||
local compile_fn="$1"
|
local compile_fn="$1"
|
||||||
local test_fn="$2"
|
local test_fn="$2"
|
||||||
|
local force_abi_v2_flag="$3"
|
||||||
|
|
||||||
|
test "$force_abi_v2_flag" = "FORCE-ABI-V2" || test "$force_abi_v2_flag" = "NO-FORCE-ABI-V2"
|
||||||
|
|
||||||
replace_version_pragmas
|
replace_version_pragmas
|
||||||
force_solc "$CONFIG" "$DIR" "$SOLJSON"
|
force_solc "$CONFIG" "$DIR" "$SOLJSON"
|
||||||
@ -258,7 +261,7 @@ function truffle_run_test
|
|||||||
clean
|
clean
|
||||||
force_solc_settings "$CONFIG" "$optimize" "istanbul"
|
force_solc_settings "$CONFIG" "$optimize" "istanbul"
|
||||||
# Force abi coder v2 in the last step. Has to be the last because code is modified.
|
# Force abi coder v2 in the last step. Has to be the last because code is modified.
|
||||||
if [ "$FORCE_ABIv2" = true ]; then
|
if [ "$force_abi_v2_flag" = "FORCE-ABI-V2" ]; then
|
||||||
[[ "$optimize" =~ yul ]] && force_abi_v2
|
[[ "$optimize" =~ yul ]] && force_abi_v2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ function ens_test
|
|||||||
|
|
||||||
run_install install_fn
|
run_install install_fn
|
||||||
|
|
||||||
truffle_run_test compile_fn test_fn
|
truffle_run_test compile_fn test_fn "NO-FORCE-ABI-V2"
|
||||||
}
|
}
|
||||||
|
|
||||||
external_test Ens ens_test
|
external_test Ens ens_test
|
||||||
|
@ -43,7 +43,7 @@ function gnosis_safe_test
|
|||||||
run_install install_fn
|
run_install install_fn
|
||||||
replace_libsolc_call
|
replace_libsolc_call
|
||||||
|
|
||||||
truffle_run_test compile_fn test_fn
|
truffle_run_test compile_fn test_fn "NO-FORCE-ABI-V2"
|
||||||
}
|
}
|
||||||
|
|
||||||
external_test Gnosis-Safe gnosis_safe_test
|
external_test Gnosis-Safe gnosis_safe_test
|
||||||
|
@ -36,7 +36,7 @@ function zeppelin_test
|
|||||||
truffle_setup https://github.com/solidity-external-tests/openzeppelin-contracts.git upgrade-0.7.0
|
truffle_setup https://github.com/solidity-external-tests/openzeppelin-contracts.git upgrade-0.7.0
|
||||||
run_install install_fn
|
run_install install_fn
|
||||||
|
|
||||||
truffle_run_test compile_fn test_fn
|
truffle_run_test compile_fn test_fn "NO-FORCE-ABI-V2"
|
||||||
}
|
}
|
||||||
|
|
||||||
external_test Zeppelin zeppelin_test
|
external_test Zeppelin zeppelin_test
|
||||||
|
Loading…
Reference in New Issue
Block a user