Merge pull request #5651 from ethereum/cmdlineJsonTests

Remove pre-release warning from standard json cmdline tests.
This commit is contained in:
chriseth 2018-12-13 15:28:40 +01:00 committed by GitHub
commit ef95a1ab53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -130,8 +130,13 @@ test_solc_behaviour() {
exitCode=$?
set -e
sed -i -e '/^Warning: This is a pre-release compiler version, please do not use it in production./d' "$stderr_path"
sed -i -e 's/ Consider adding "pragma .*$//' "$stderr_path"
if [[ "$solc_args" == *"--standard-json"* ]]; then
sed -i -e 's/{[^{]*Warning: This is a pre-release compiler version[^}]*},\{0,1\}//' "$stdout_path"
sed -i -e 's/,"errors":\[\]//' "$stdout_path"
else
sed -i -e '/^Warning: This is a pre-release compiler version, please do not use it in production./d' "$stderr_path"
sed -i -e 's/ Consider adding "pragma .*$//' "$stderr_path"
fi
if [[ $exitCode -ne "$exit_code_expected" ]]; then
printError "Incorrect exit code. Expected $exit_code_expected but got $exitCode."

View File

@ -1 +1 @@
{"contracts":{"A":{"C":{"evm":{}}}},"errors":[{"component":"general","formattedMessage":"Warning: This is a pre-release compiler version, please do not use it in production.\n","message":"This is a pre-release compiler version, please do not use it in production.","severity":"warning","type":"Warning"}],"sources":{"A":{"id":0}}}
{"contracts":{"A":{"C":{"evm":{}}}},"sources":{"A":{"id":0}}}