Skip to content

Conversation

@adasauce
Copy link
Contributor

@adasauce adasauce commented Nov 5, 2020

Adds an optimize flag to the commander CLI config which generates a
CompilerConfiguration object and passes it down the line to the
compiler optionally.

Running tests on a larger contract without optimization causes it to complain about gas and fail.

running without optimize:

$ remix-tests /tests/test  

        👁       :: Running remix-tests - Unit testing for solidity ::   👁

[18:59:41] info: 1 Solidity test file found
'creation of library remix_accounts.sol:TestsAccounts pending...'
'creation of library remix_tests.sol:Assert pending...'
Error: The contract code couldn't be stored, please check your gas limit.
...

running with optimize:

$ remix-tests --optimize true /tests/test

        👁       :: Running remix-tests - Unit testing for solidity ::   👁

[18:54:48] info: compiler optimization set to undefined
[18:54:48] info: 1 Solidity test file found
'creation of library remix_accounts.sol:TestsAccounts pending...'
'creation of library remix_tests.sol:Assert pending...'

        ◼  Test
        ✓  Test yy owner
        ✓  Test xx roles


2 passing (0.762s)

Fixes #540

Adds an optimize flag to the commander CLI config which generates a
CompilerConfiguration object and passes it down the line to the
compiler optionally.
@yann300
Copy link
Contributor

yann300 commented Jan 19, 2021

this will be handled by #741
Thanks for the PR

@yann300 yann300 closed this Jan 19, 2021
yann300 pushed a commit that referenced this pull request Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom compiler context for remix-tests CLI

2 participants