mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
prepare_report.py: Add --force-no-optimize-yul flag to work around a bug in solc 0.6.0/0.6.1
This commit is contained in:
@@ -122,6 +122,7 @@ class TestPrepareReport(unittest.TestCase):
|
||||
Path('solc'),
|
||||
SMT_SMOKE_TEST_SOL_PATH,
|
||||
optimize=True,
|
||||
force_no_optimize_yul=False,
|
||||
interface=CompilerInterface.STANDARD_JSON,
|
||||
smt_use=SMTUse.DISABLE
|
||||
)
|
||||
@@ -134,6 +135,7 @@ class TestPrepareReport(unittest.TestCase):
|
||||
Path('solc'),
|
||||
SMT_SMOKE_TEST_SOL_PATH,
|
||||
optimize=True,
|
||||
force_no_optimize_yul=False,
|
||||
interface=CompilerInterface.CLI,
|
||||
smt_use=SMTUse.DISABLE
|
||||
)
|
||||
@@ -141,6 +143,19 @@ class TestPrepareReport(unittest.TestCase):
|
||||
self.assertEqual(command_line, ['solc', str(SMT_SMOKE_TEST_SOL_PATH), '--bin', '--metadata', '--optimize', '--model-checker-engine', 'none'])
|
||||
self.assertEqual(compiler_input, SMT_SMOKE_TEST_SOL_CODE)
|
||||
|
||||
def test_prepare_compiler_input_should_handle_force_no_optimize_yul_flag(self):
|
||||
(command_line, compiler_input) = prepare_compiler_input(
|
||||
Path('solc'),
|
||||
SMT_SMOKE_TEST_SOL_PATH,
|
||||
optimize=False,
|
||||
force_no_optimize_yul=True,
|
||||
interface=CompilerInterface.CLI,
|
||||
smt_use=SMTUse.DISABLE
|
||||
)
|
||||
|
||||
self.assertEqual(command_line, ['solc', str(SMT_SMOKE_TEST_SOL_PATH), '--bin', '--metadata', '--no-optimize-yul', '--model-checker-engine', 'none'])
|
||||
self.assertEqual(compiler_input, SMT_SMOKE_TEST_SOL_CODE)
|
||||
|
||||
def test_parse_standard_json_output(self):
|
||||
expected_report = FileReport(
|
||||
file_name=Path('syntaxTests/scoping/library_inherited2.sol'),
|
||||
|
||||
Reference in New Issue
Block a user