Merge pull request #6186 from ethereum/runExternalTestsWithOptimizer

Run external tests with and without optimizer.
This commit is contained in:
chriseth 2019-03-07 12:57:03 +01:00 committed by GitHub
commit 7241aa755c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,10 +91,15 @@ function test_truffle
module.exports['compilers'] = {solc: {version: "$DIR/solc"} }; module.exports['compilers'] = {solc: {version: "$DIR/solc"} };
EOF EOF
npx truffle compile for optimize in "{enabled: false }" "{enabled: true }" "{enabled: true, details: { yul: true } }"
echo "Verify that the correct version ($SOLCVERSION) of the compiler was used to compile the contracts..." do
grep -e "$SOLCVERSION" -r build/contracts > /dev/null rm -rf build || true
npm run test echo "module.exports['compilers']['solc']['settings'] = {optimizer: $optimize };" >> truffle*.js
npx truffle compile
echo "Verify that the correct version ($SOLCVERSION) of the compiler was used to compile the contracts..."
grep -e "$SOLCVERSION" -r build/contracts > /dev/null
npm run test
done
) )
rm -rf "$DIR" rm -rf "$DIR"
} }