Run external tests with and without optimizer.

This commit is contained in:
chriseth 2019-03-05 14:53:36 +01:00
parent 5ddf9e269f
commit d70da689ef

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"
} }