mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12765 from ethereum/euler-timeout-fix
Increase Hardhat timeout in Euler ext test
This commit is contained in:
commit
794752c649
@ -233,7 +233,6 @@ function force_truffle_compiler_settings
|
|||||||
function name_hardhat_default_export
|
function name_hardhat_default_export
|
||||||
{
|
{
|
||||||
local config_file="$1"
|
local config_file="$1"
|
||||||
local config_var_name="$2"
|
|
||||||
|
|
||||||
local import="import {HardhatUserConfig} from 'hardhat/types';"
|
local import="import {HardhatUserConfig} from 'hardhat/types';"
|
||||||
local config="const config: HardhatUserConfig = {"
|
local config="const config: HardhatUserConfig = {"
|
||||||
@ -241,6 +240,29 @@ function name_hardhat_default_export
|
|||||||
echo "export default config;" >> "$config_file"
|
echo "export default config;" >> "$config_file"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function force_hardhat_timeout
|
||||||
|
{
|
||||||
|
local config_file="$1"
|
||||||
|
local config_var_name="$2"
|
||||||
|
local new_timeout="$3"
|
||||||
|
|
||||||
|
printLog "Configuring Hardhat..."
|
||||||
|
echo "-------------------------------------"
|
||||||
|
echo "Timeout: ${new_timeout}"
|
||||||
|
echo "-------------------------------------"
|
||||||
|
|
||||||
|
if [[ $config_file == *\.js ]]; then
|
||||||
|
[[ $config_var_name == "" ]] || assertFail
|
||||||
|
echo "module.exports.mocha = module.exports.mocha || {timeout: ${new_timeout}}"
|
||||||
|
echo "module.exports.mocha.timeout = ${new_timeout}"
|
||||||
|
else
|
||||||
|
[[ $config_file == *\.ts ]] || assertFail
|
||||||
|
[[ $config_var_name != "" ]] || assertFail
|
||||||
|
echo "${config_var_name}.mocha = ${config_var_name}.mocha ?? {timeout: ${new_timeout}};"
|
||||||
|
echo "${config_var_name}.mocha!.timeout = ${new_timeout}"
|
||||||
|
fi >> "$config_file"
|
||||||
|
}
|
||||||
|
|
||||||
function force_hardhat_compiler_binary
|
function force_hardhat_compiler_binary
|
||||||
{
|
{
|
||||||
local config_file="$1"
|
local config_file="$1"
|
||||||
|
@ -63,6 +63,8 @@ function euler_test
|
|||||||
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"
|
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"
|
||||||
force_hardhat_compiler_settings "$config_file" "$(first_word "$SELECTED_PRESETS")"
|
force_hardhat_compiler_settings "$config_file" "$(first_word "$SELECTED_PRESETS")"
|
||||||
force_hardhat_unlimited_contract_size "$config_file"
|
force_hardhat_unlimited_contract_size "$config_file"
|
||||||
|
# Workaround for the timeout that's too short for unoptimized code (https://github.com/ethereum/solidity/pull/12765)
|
||||||
|
force_hardhat_timeout "$config_file" "" 100000
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
replace_version_pragmas
|
replace_version_pragmas
|
||||||
|
Loading…
Reference in New Issue
Block a user