Skip to content

Commit f6fdc42

Browse files
author
Dimitry Kh
committed
fix dr with --testpath issue
1 parent c768ec7 commit f6fdc42

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

retesteth/preprocessOptions.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ std::tuple<OptionsVector, ParsedOptions> preparseOptions(int& _argc, const char*
163163
ParsedOptions optInfo;
164164
vector<string> options;
165165

166+
bool copyTestPathOption = false;
166167
optInfo.cwd = fs::path(fs::current_path());
167168
options.emplace_back(_argv[0]);
168169
for (short i = 1; i < _argc; i++)
@@ -172,6 +173,17 @@ std::tuple<OptionsVector, ParsedOptions> preparseOptions(int& _argc, const char*
172173
if (arg == "-t")
173174
optInfo.hasTArg = true;
174175

176+
// Copy "--testpath path" as is
177+
if (arg == "--testpath" || copyTestPathOption)
178+
{
179+
if (arg == "--testpath")
180+
copyTestPathOption = true;
181+
else
182+
copyTestPathOption = false;
183+
options.emplace_back(arg);
184+
continue;
185+
}
186+
175187
bool isFile = (arg.find(".json") != string::npos || arg.find(".yml") != string::npos
176188
|| arg.find(".py") != string::npos);
177189

0 commit comments

Comments
 (0)