Patch external tests for the override data alignment issue until our patches are accepted upstream

This commit is contained in:
Kamil Śliwak 2022-03-24 20:00:00 +01:00 committed by chriseth
parent dfa0bcf760
commit 27e5afa23d
3 changed files with 14 additions and 0 deletions

View File

@ -86,6 +86,14 @@ function bleeps_test
npm install npm-run-all
npm install
# TODO: Bleeps depends on OpenZeppelin 4.3.2, which is affected by
# https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3293.
# Forcing OZ >= 4.6.0 fixes this but it also causes a lot of unrelated compilation errors.
# Remove this when Bleeps gets updated to support newer OpenZeppelin.
perl -i -0pe \
"s/(function hashProposal\(\n address\[\] )calldata( targets,\n uint256\[\] )calldata( values,\n bytes\[\] )calldata( calldatas,)/\1memory\2memory\3memory\4/g" \
node_modules/@openzeppelin/contracts/governance/IGovernor.sol
replace_version_pragmas
for preset in $SELECTED_PRESETS; do

View File

@ -62,6 +62,9 @@ function brink_test
setup_solc "$DIR" "$BINARY_TYPE" "$BINARY_PATH"
download_project "$repo" "$ref_type" "$ref" "$DIR"
# TODO: Remove this when Brink merges https://github.com/brinktrade/brink-core/pull/52
sed -i "s|\(function isValidSignature(bytes \)calldata\( _data, bytes \)calldata\( _signature)\)|\1memory\2memory\3|g" contracts/Test/MockEIP1271Validator.sol
neutralize_package_lock
neutralize_package_json_hooks
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"

View File

@ -79,6 +79,9 @@ function gnosis_safe_test
sed -i 's|\(describe\)\(("Upgrade from Safe 1.1.1"\)|\1.skip\2|g' test/migration/UpgradeFromSafe111.spec.ts
sed -i 's|\(describe\)\(("Upgrade from Safe 1.2.0"\)|\1.skip\2|g' test/migration/UpgradeFromSafe120.spec.ts
# TODO: Remove this when Gnosis merges https://github.com/gnosis/safe-contracts/pull/394
sed -i "s|\(function isValidSignature(bytes \)calldata\( _data, bytes \)calldata\( _signature)\)|\1memory\2memory\3|g" contracts/handler/CompatibilityFallbackHandler.sol
neutralize_package_lock
neutralize_package_json_hooks
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"