Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Commit 3ffc478

Browse files
authored
Merge pull request #3656 from winsvega/tests
Tests repo as a submodule
2 parents 8a704ec + 93697d3 commit 3ffc478

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
path = evmjit
33
url = https://github.com/ethereum/evmjit
44
branch = develop
5+
[submodule "test/tests"]
6+
path = test/jsontests
7+
url = https://github.com/ethereum/tests.git

test/jsontests

Submodule jsontests added at 8858744

test/tools/libtesteth/Options.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ void printHelp()
3232
cout << std::endl << "Setting test suite" << std::endl;
3333
cout << setw(30) << "-t <TestSuite>" << setw(25) << "Execute test operations" << std::endl;
3434
cout << setw(30) << "-t <TestSuite>/<TestCase>" << std::endl;
35+
cout << setw(30) << "--testpath <PathToTheTestRepo>" << std::endl;
3536

3637
cout << std::endl << "Debugging" << std::endl;
3738
cout << setw(30) << "-d <index>" << setw(25) << "Set the transaction data array index when running GeneralStateTests" << std::endl;
@@ -193,6 +194,8 @@ Options::Options(int argc, char** argv)
193194
trGasIndex = atoi(argv[i + 1]);
194195
else if (arg == "-v" && i + 1 < argc)
195196
trValueIndex = atoi(argv[i + 1]);
197+
else if (arg == "--testpath" && i + 1 < argc)
198+
testpath = std::string{argv[i + 1]};
196199
}
197200

198201
//Default option

test/tools/libtesteth/Options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class Options
4848
bool checkstate = false;///< Throw error when checking test states
4949
bool fulloutput = false;///< Replace large output to just it's length
5050
bool createRandomTest = false; ///< Generate random test
51+
std::string testpath; ///< Custom test folder path
5152
Verbosity logVerbosity = Verbosity::NiceReport;
5253

5354
/// Test selection

test/tools/libtestutils/Common.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <libdevcore/CommonData.h>
2525
#include <libdevcore/CommonIO.h>
2626
#include <libdevcore/FileSystem.h>
27+
#include <test/tools/libtesteth/Options.h>
2728
#include "Common.h"
2829

2930
using namespace std;
@@ -34,6 +35,9 @@ const char* TestChannel::name() { return "TST"; }
3435

3536
std::string dev::test::getTestPath()
3637
{
38+
if (!Options::get().testpath.empty())
39+
return Options::get().testpath;
40+
3741
string testPath;
3842
const char* ptestPath = getenv("ETHEREUM_TEST_PATH");
3943

0 commit comments

Comments
 (0)