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

Add --version option to testing tools #902

Merged
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
2 changes: 1 addition & 1 deletion test/blockchaintest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

add_executable(evmone-blockchaintest)
target_link_libraries(evmone-blockchaintest PRIVATE evmone evmone::statetestutils GTest::gtest)
target_link_libraries(evmone-blockchaintest PRIVATE evmone evmone::statetestutils evmone-buildinfo GTest::gtest)
target_include_directories(evmone-blockchaintest PRIVATE ${evmone_private_include_dir})
target_sources(
evmone-blockchaintest PRIVATE
Expand Down
3 changes: 3 additions & 0 deletions test/blockchaintest/blockchaintest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "blockchaintest.hpp"
#include <CLI/CLI.hpp>
#include <evmone/evmone.h>
#include <evmone/version.h>
#include <gtest/gtest.h>
#include <iostream>

Expand Down Expand Up @@ -74,6 +75,8 @@ int main(int argc, char* argv[])

CLI::App app{"evmone blockchain test runner"};

app.set_version_flag("--version", "evmone-blockchaintest " EVMONE_VERSION);

std::vector<std::string> paths;
app.add_option("path", paths, "Path to test file or directory")
->required()
Expand Down
2 changes: 1 addition & 1 deletion test/statetest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ target_sources(
)

add_executable(evmone-statetest)
target_link_libraries(evmone-statetest PRIVATE evmone::statetestutils evmone GTest::gtest)
target_link_libraries(evmone-statetest PRIVATE evmone::statetestutils evmone evmone-buildinfo GTest::gtest)
target_include_directories(evmone-statetest PRIVATE ${evmone_private_include_dir})
target_sources(
evmone-statetest PRIVATE
Expand Down
3 changes: 3 additions & 0 deletions test/statetest/statetest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "statetest.hpp"
#include <CLI/CLI.hpp>
#include <evmone/evmone.h>
#include <evmone/version.h>
#include <gtest/gtest.h>
#include <iostream>

Expand Down Expand Up @@ -80,6 +81,8 @@ int main(int argc, char* argv[])

CLI::App app{"evmone state test runner"};

app.set_version_flag("--version", "evmone-statetest " EVMONE_VERSION);

std::vector<std::string> paths;
app.add_option("path", paths, "Path to test file or directory")
->required()
Expand Down
2 changes: 1 addition & 1 deletion test/t8n/t8n.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main(int argc, const char* argv[])
{
const std::string_view arg{argv[i]};

if (arg == "-v")
if (arg == "-v" || arg == "--version")
{
std::cout << "evmone-t8n " EVMONE_VERSION "\n";
return 0;
Expand Down