Adds ability to inject death test child arguments for test purposes.
This commit is contained in:
@@ -844,6 +844,11 @@ class ExecDeathTest : public ForkingDeathTest {
|
||||
ForkingDeathTest(a_statement, a_regex), file_(file), line_(line) { }
|
||||
virtual TestRole AssumeRole();
|
||||
private:
|
||||
static ::std::vector<testing::internal::string>
|
||||
GetArgvsForDeathTestChildProcess() {
|
||||
::std::vector<testing::internal::string> args = GetInjectableArgvs();
|
||||
return args;
|
||||
}
|
||||
// The name of the file in which the death test is located.
|
||||
const char* const file_;
|
||||
// The line number on which the death test is located.
|
||||
@@ -1082,7 +1087,7 @@ DeathTest::TestRole ExecDeathTest::AssumeRole() {
|
||||
GTEST_FLAG_PREFIX_, kInternalRunDeathTestFlag,
|
||||
file_, line_, death_test_index, pipe_fd[1]);
|
||||
Arguments args;
|
||||
args.AddArguments(GetArgvs());
|
||||
args.AddArguments(GetArgvsForDeathTestChildProcess());
|
||||
args.AddArgument(filter_flag.c_str());
|
||||
args.AddArgument(internal_flag.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user