| 140 | } |
| 141 | |
| 142 | void TTestEnv::ReInitialize() { |
| 143 | IsRunningFromTest = false; |
| 144 | SourceRoot = ""; |
| 145 | BuildRoot = ""; |
| 146 | WorkPath = ""; |
| 147 | RamDrivePath = ""; |
| 148 | YtHddPath = ""; |
| 149 | TestOutputRamDrivePath = ""; |
| 150 | GdbPath = ""; |
| 151 | CoreSearchFile = ""; |
| 152 | EnvFile = ""; |
| 153 | TestParameters.clear(); |
| 154 | GlobalResources.clear(); |
| 155 | |
| 156 | const TString contextFilename = GetEnv("YA_TEST_CONTEXT_FILE"); |
| 157 | if (contextFilename && TFsPath(contextFilename).Exists()) { |
| 158 | NJson::TJsonValue context; |
| 159 | NJson::ReadJsonTree(TFileInput(contextFilename).ReadAll(), &context); |
| 160 | |
| 161 | NJson::TJsonValue* value; |
| 162 | |
| 163 | value = context.GetValueByPath("runtime.source_root"); |
| 164 | if (value) { |
| 165 | SourceRoot = value->GetStringSafe(""); |
| 166 | } |
| 167 | |
| 168 | value = context.GetValueByPath("runtime.build_root"); |
| 169 | if (value) { |
| 170 | BuildRoot = value->GetStringSafe(""); |
| 171 | } |
| 172 | |
| 173 | value = context.GetValueByPath("runtime.work_path"); |
| 174 | if (value) { |
| 175 | WorkPath = value->GetStringSafe(""); |
| 176 | } |
| 177 | |
| 178 | value = context.GetValueByPath("runtime.ram_drive_path"); |
| 179 | if (value) { |
| 180 | RamDrivePath = value->GetStringSafe(""); |
| 181 | } |
| 182 | |
| 183 | value = context.GetValueByPath("runtime.yt_hdd_path"); |
| 184 | if (value) { |
| 185 | YtHddPath = value->GetStringSafe(""); |
| 186 | } |
| 187 | |
| 188 | value = context.GetValueByPath("runtime.test_output_ram_drive_path"); |
| 189 | if (value) { |
| 190 | TestOutputRamDrivePath = value->GetStringSafe(""); |
| 191 | } |
| 192 | |
| 193 | value = context.GetValueByPath("runtime.gdb_bin"); |
| 194 | if (value) { |
| 195 | GdbPath = value->GetStringSafe(""); |
| 196 | } |
| 197 | |
| 198 | value = context.GetValueByPath("runtime.test_params"); |
| 199 | if (value) { |
no test coverage detected