MCPcopy Create free account
hub / github.com/Samsung/UTopia / generate

Method generate

tests/TestHelper.cpp:266–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266bool GenTestHelper::generate(std::string BaseDir, std::string OutputDir,
267 std::vector<std::string> APINames) {
268
269 if (!UA)
270 return false;
271
272 TargetDirPath = getUniqueFilePath(getTmpDirPath(), "target", "");
273 if (!storeTargetAnalysisReport(TargetDirPath))
274 return false;
275
276 UTReportPath = getUniqueFilePath(getTmpDirPath(), "ut", "json");
277 if (!UA->dumpReport(UTReportPath))
278 return false;
279
280 std::set<std::string> APINameSet(APINames.begin(), APINames.end());
281
282 if (fs::exists(OutputDir)) {
283 if (!fs::remove_all(OutputDir))
284 return false;
285 }
286 if (!fs::create_directories(OutputDir))
287 return false;
288
289 FuzzGenerator.generate(BaseDir, APINameSet, TargetDirPath, UTReportPath,
290 OutputDir);
291
292 return true;
293}
294
295const Generator &GenTestHelper::getGenerator() const { return FuzzGenerator; }
296

Callers 6

mainFunction · 0.45
SetUpTestCaseMethod · 0.45
TESTFunction · 0.45
SetUpTestCaseMethod · 0.45
TEST_FFunction · 0.45
getDefMapGeneratorMethod · 0.45

Calls 5

getUniqueFilePathFunction · 0.85
getTmpDirPathFunction · 0.85
dumpReportMethod · 0.80
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected