Skip to content

Commit

Permalink
Omit running semantic and syntax tests when compileViaYul is false an…
Browse files Browse the repository at this point in the history
…d EFO enabled.
  • Loading branch information
rodiazet committed Feb 3, 2025
1 parent 40aad41 commit 0555618
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/libsolidity/SemanticTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ SemanticTest::SemanticTest(
auto const eofEnabled = solidity::test::CommonOptions::get().eofVersion().has_value();
std::string compileViaYul = m_reader.stringSetting("compileViaYul", eofEnabled ? "true" : "also");

if (compileViaYul == "false" && eofEnabled)
m_shouldRun = false;

if (m_runWithABIEncoderV1Only && compileViaYul != "false")
BOOST_THROW_EXCEPTION(std::runtime_error(
"ABIEncoderV1Only tests cannot be run via yul, "
Expand Down
4 changes: 4 additions & 0 deletions test/libsolidity/SyntaxTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ SyntaxTest::SyntaxTest(
m_compileViaYul = m_reader.stringSetting("compileViaYul", eofEnabled ? "true" : "false");
if (!util::contains(compileViaYulAllowedValues, m_compileViaYul))
BOOST_THROW_EXCEPTION(std::runtime_error("Invalid compileViaYul value: " + m_compileViaYul + "."));

if (m_compileViaYul == "false" && eofEnabled)
m_shouldRun = false;

m_optimiseYul = m_reader.boolSetting("optimize-yul", true);

static std::map<std::string, PipelineStage> const pipelineStages = {
Expand Down

0 comments on commit 0555618

Please sign in to comment.