Merge pull request #7572 from ethereum/ext-tests-version-pragma

Update version pragma replacement in external tests
This commit is contained in:
Alex Beregszaszi 2019-10-25 21:26:06 +01:00 committed by GitHub
commit 302a51a58c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,15 +66,14 @@ function setup
setup_solcjs "$DIR" "$SOLJSON"
download_project "$repo" "$branch" "$DIR"
replace_version_pragmas
}
function replace_version_pragmas
{
# Replace fixed-version pragmas in Gnosis (part of Consensys best practice)
# Replace fixed-version pragmas (part of Consensys best practice).
# Include all directories to also cover node dependencies.
printLog "Replacing fixed-version pragmas..."
find contracts test -name '*.sol' -type f -print0 | xargs -0 sed -i -e 's/pragma solidity [\^0-9\.]*/pragma solidity >=0.0/'
find . test -name '*.sol' -type f -print0 | xargs -0 sed -i -e 's/pragma solidity [\^0-9\.]*/pragma solidity >=0.0/'
}
function replace_libsolc_call
@ -187,6 +186,7 @@ function run_test
local compile_fn="$1"
local test_fn="$2"
replace_version_pragmas
force_solc "$CONFIG" "$DIR" "$SOLJSON"
printLog "Checking optimizer level..."