From a1ed0c972e994e88bce8b1bf529d44c2278689de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 21 Oct 2024 10:21:12 +0200 Subject: [PATCH] cmd/test/ethereum: add support for EEST Add support for Ethereum Execution Spec Tests (EEST) fixtures (archives of generated JSON tests). In EEST fixtures blockchain tests are placed in `blockchain_tests` subdirectory so register it for the blockchain test runner. Usage is: cmd/test/ethereum --tests path/to/fixtures Example EEST release: https://github.com/ethereum/execution-spec-tests/releases/tag/v3.0.0 --- cmd/test/ethereum.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/test/ethereum.cpp b/cmd/test/ethereum.cpp index 872c6b9a85..f5c59a3910 100644 --- a/cmd/test/ethereum.cpp +++ b/cmd/test/ethereum.cpp @@ -42,7 +42,8 @@ #include #include -// See https://ethereum-tests.readthedocs.io +// See EEST: https://ethereum.github.io/execution-spec-tests. +// See legacy tests: https://ethereum-tests.readthedocs.io. using namespace silkworm; using namespace silkworm::protocol; @@ -55,7 +56,10 @@ static const fs::path kBlockchainDir{"BlockchainTests"}; static const fs::path kTransactionDir{"TransactionTests"}; -static const std::vector kSlowTests{ +/// The path to the blockchain tests in Execution Spec Tests (EEST) fixtures. +static const fs::path kEESTBlockchainDir{"blockchain_tests"}; + +static const std::array kSlowTests{ kBlockchainDir / "GeneralStateTests" / "stTimeConsuming", kBlockchainDir / "GeneralStateTests" / "VMTests" / "vmPerformance", }; @@ -466,7 +470,8 @@ int main(int argc, char* argv[]) { const fs::path root_dir{tests_path}; - static const std::map kTestTypes{ + const std::vector> kTestTypes{ + {kEESTBlockchainDir, blockchain_test}, {kDifficultyDir, difficulty_tests}, {kBlockchainDir, blockchain_test}, {kTransactionDir, transaction_test},