From d70da689ef394dc5928e024c8b6958449eb3c2f1 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 5 Mar 2019 14:53:36 +0100 Subject: [PATCH] Run external tests with and without optimizer. --- test/externalTests.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/externalTests.sh b/test/externalTests.sh index 299e32139..0ee492d9c 100755 --- a/test/externalTests.sh +++ b/test/externalTests.sh @@ -91,10 +91,15 @@ function test_truffle module.exports['compilers'] = {solc: {version: "$DIR/solc"} }; EOF - 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 + for optimize in "{enabled: false }" "{enabled: true }" "{enabled: true, details: { yul: true } }" + do + rm -rf build || true + 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" }