Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eof: Disable gasTests for EOF #15653

Merged
merged 3 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .circleci/soltest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,6 @@ EOF_EXCLUDES=(
--run_test='!SolidityInlineAssembly/Analysis/large_constant'
--run_test='!SolidityInlineAssembly/Analysis/staticcall'
--run_test='!ViewPureChecker/assembly_staticcall'
--run_test='!gasTests/abiv2'
--run_test='!gasTests/abiv2_optimised'
--run_test='!gasTests/data_storage'
--run_test='!gasTests/dispatch_large'
--run_test='!gasTests/dispatch_large_optimised'
--run_test='!gasTests/dispatch_medium'
--run_test='!gasTests/dispatch_medium_optimised'
--run_test='!gasTests/dispatch_small'
--run_test='!gasTests/dispatch_small_optimised'
--run_test='!gasTests/exp'
--run_test='!gasTests/exp_optimized'
--run_test='!gasTests/storage_costs'
--run_test='!yulStackLayout/literal_loop'
cameel marked this conversation as resolved.
Show resolved Hide resolved
)

Expand Down
6 changes: 1 addition & 5 deletions test/libsolidity/GasTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ using namespace solidity;
using namespace boost::unit_test;

GasTest::GasTest(std::string const& _filename):
TestCase(_filename)
EVMVersionRestrictedTestCase(_filename)
{
m_source = m_reader.source();
m_optimise = m_reader.boolSetting("optimize", false);
Expand Down Expand Up @@ -114,10 +114,6 @@ void GasTest::setupCompiler(CompilerStack& _compiler)
}
settings.expectedExecutionsPerDeployment = m_optimiseRuns;
_compiler.setOptimiserSettings(settings);

// Intentionally ignoring EVM version specified on the command line.
// Gas expectations are only valid for the default version.
_compiler.setEVMVersion(EVMVersion{});
}

TestCase::TestResult GasTest::run(std::ostream& _stream, std::string const& _linePrefix, bool _formatted)
Expand Down
2 changes: 1 addition & 1 deletion test/libsolidity/GasTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
namespace solidity::frontend::test
{

class GasTest: AnalysisFramework, public TestCase
class GasTest: AnalysisFramework, public EVMVersionRestrictedTestCase
cameel marked this conversation as resolved.
Show resolved Hide resolved
{
public:
static std::unique_ptr<TestCase> create(Config const& _config)
Expand Down
3 changes: 3 additions & 0 deletions test/libsolidity/gasTests/abiv2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ contract C {
function f7(uint[31] memory, string[20] memory, C, address) public returns (bytes[] memory, uint16[] memory) {}
function f8(uint[32] memory, string[] memory, uint32, address) public returns (uint[] memory, uint16[] memory) {}
}
// ====
// EVMVersion: =current
// bytecodeFormat: legacy
// ----
// creation:
// codeDepositCost: 1208000
Expand Down
2 changes: 2 additions & 0 deletions test/libsolidity/gasTests/abiv2_optimised.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ contract C {
function f8(uint[32] memory, string[] memory, uint32, address) public returns (uint[] memory, uint16[] memory) {}
}
// ====
// EVMVersion: =current
// bytecodeFormat: legacy
// optimize: true
// optimize-yul: true
// ----
Expand Down
3 changes: 3 additions & 0 deletions test/libsolidity/gasTests/data_storage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ contract C {
require(false, "12345678901234567890123456789012123456789012345678901234567890123");
}
}
// ====
// EVMVersion: =current
// bytecodeFormat: legacy
// ----
// creation:
// codeDepositCost: 377800
Expand Down
3 changes: 3 additions & 0 deletions test/libsolidity/gasTests/dispatch_large.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ contract Large {
function g9(uint x) public payable returns (uint) { b[uint8(msg.data[8])] = x; }
function g0(uint x) public payable returns (uint) { require(x > 10); }
}
// ====
// EVMVersion: =current
// bytecodeFormat: legacy
// ----
// creation:
// codeDepositCost: 618400
Expand Down
2 changes: 2 additions & 0 deletions test/libsolidity/gasTests/dispatch_large_optimised.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ contract Large {
function g0(uint x) public payable returns (uint) { require(x > 10); }
}
// ====
// EVMVersion: =current
// bytecodeFormat: legacy
// optimize: true
// optimize-runs: 2
// ----
Expand Down
3 changes: 3 additions & 0 deletions test/libsolidity/gasTests/dispatch_medium.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ contract Medium {
function g9(uint x) public payable returns (uint) { b[uint8(msg.data[8])] = x; }
function g0(uint x) public payable returns (uint) { require(x > 10); }
}
// ====
// EVMVersion: =current
// bytecodeFormat: legacy
// ----
// creation:
// codeDepositCost: 259600
Expand Down
3 changes: 3 additions & 0 deletions test/libsolidity/gasTests/dispatch_medium_optimised.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ contract Medium {
function g0(uint x) public payable returns (uint) { require(x > 10); }
}
// ====
// EVMVersion: =current
// bytecodeFormat: legacy
// ====
// optimize: true
// optimize-runs: 2
// ----
Expand Down
3 changes: 3 additions & 0 deletions test/libsolidity/gasTests/dispatch_small.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ contract Small {
function f1(uint x) public returns (uint) { a = x; b[uint8(msg.data[0])] = x; }
fallback () external payable {}
}
// ====
// EVMVersion: =current
// bytecodeFormat: legacy
// ----
// creation:
// codeDepositCost: 103800
Expand Down
2 changes: 2 additions & 0 deletions test/libsolidity/gasTests/dispatch_small_optimised.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ contract Small {
fallback () external payable {}
}
// ====
// EVMVersion: =current
// optimize: true
// optimize-runs: 2
// bytecodeFormat: legacy
// ----
// creation:
// codeDepositCost: 58200
Expand Down
2 changes: 2 additions & 0 deletions test/libsolidity/gasTests/exp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ contract C {
}
}
// ====
// EVMVersion: =current
// bytecodeFormat: legacy
// optimize: false
// optimize-yul: false
// ----
Expand Down
2 changes: 2 additions & 0 deletions test/libsolidity/gasTests/exp_optimized.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ contract C {
}
}
// ====
// EVMVersion: =current
// bytecodeFormat: legacy
// optimize: true
// optimize-yul: true
// ----
Expand Down
2 changes: 2 additions & 0 deletions test/libsolidity/gasTests/storage_costs.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ contract C {
}
}
// ====
// EVMVersion: =current
// optimize: true
// optimize-yul: true
// bytecodeFormat: legacy
// ----
// creation:
// codeDepositCost: 25600
Expand Down