cmCTestLaunch.cxx 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "cmCTestLaunch.h"
  4. #include "cmConfigure.h"
  5. #include "cmsys/FStream.hxx"
  6. #include "cmsys/Process.h"
  7. #include "cmsys/RegularExpression.hxx"
  8. #include <iostream>
  9. #include <stdlib.h>
  10. #include <string.h>
  11. #include "cmCryptoHash.h"
  12. #include "cmGeneratedFileStream.h"
  13. #include "cmGlobalGenerator.h"
  14. #include "cmMakefile.h"
  15. #include "cmProcessOutput.h"
  16. #include "cmStateSnapshot.h"
  17. #include "cmSystemTools.h"
  18. #include "cmXMLWriter.h"
  19. #include "cm_auto_ptr.hxx"
  20. #include "cmake.h"
  21. #ifdef _WIN32
  22. #include <fcntl.h> // for _O_BINARY
  23. #include <io.h> // for _setmode
  24. #include <stdio.h> // for std{out,err} and fileno
  25. #endif
  26. cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv)
  27. {
  28. this->Passthru = true;
  29. this->Process = CM_NULLPTR;
  30. this->ExitCode = 1;
  31. this->CWD = cmSystemTools::GetCurrentWorkingDirectory();
  32. if (!this->ParseArguments(argc, argv)) {
  33. return;
  34. }
  35. this->ComputeFileNames();
  36. this->ScrapeRulesLoaded = false;
  37. this->HaveOut = false;
  38. this->HaveErr = false;
  39. this->Process = cmsysProcess_New();
  40. }
  41. cmCTestLaunch::~cmCTestLaunch()
  42. {
  43. cmsysProcess_Delete(this->Process);
  44. if (!this->Passthru) {
  45. cmSystemTools::RemoveFile(this->LogOut);
  46. cmSystemTools::RemoveFile(this->LogErr);
  47. }
  48. }
  49. bool cmCTestLaunch::ParseArguments(int argc, const char* const* argv)
  50. {
  51. // Launcher options occur first and are separated from the real
  52. // command line by a '--' option.
  53. enum Doing
  54. {
  55. DoingNone,
  56. DoingOutput,
  57. DoingSource,
  58. DoingLanguage,
  59. DoingTargetName,
  60. DoingTargetType,
  61. DoingBuildDir,
  62. DoingCount,
  63. DoingFilterPrefix
  64. };
  65. Doing doing = DoingNone;
  66. int arg0 = 0;
  67. for (int i = 1; !arg0 && i < argc; ++i) {
  68. const char* arg = argv[i];
  69. if (strcmp(arg, "--") == 0) {
  70. arg0 = i + 1;
  71. } else if (strcmp(arg, "--output") == 0) {
  72. doing = DoingOutput;
  73. } else if (strcmp(arg, "--source") == 0) {
  74. doing = DoingSource;
  75. } else if (strcmp(arg, "--language") == 0) {
  76. doing = DoingLanguage;
  77. } else if (strcmp(arg, "--target-name") == 0) {
  78. doing = DoingTargetName;
  79. } else if (strcmp(arg, "--target-type") == 0) {
  80. doing = DoingTargetType;
  81. } else if (strcmp(arg, "--build-dir") == 0) {
  82. doing = DoingBuildDir;
  83. } else if (strcmp(arg, "--filter-prefix") == 0) {
  84. doing = DoingFilterPrefix;
  85. } else if (doing == DoingOutput) {
  86. this->OptionOutput = arg;
  87. doing = DoingNone;
  88. } else if (doing == DoingSource) {
  89. this->OptionSource = arg;
  90. doing = DoingNone;
  91. } else if (doing == DoingLanguage) {
  92. this->OptionLanguage = arg;
  93. if (this->OptionLanguage == "CXX") {
  94. this->OptionLanguage = "C++";
  95. }
  96. doing = DoingNone;
  97. } else if (doing == DoingTargetName) {
  98. this->OptionTargetName = arg;
  99. doing = DoingNone;
  100. } else if (doing == DoingTargetType) {
  101. this->OptionTargetType = arg;
  102. doing = DoingNone;
  103. } else if (doing == DoingBuildDir) {
  104. this->OptionBuildDir = arg;
  105. doing = DoingNone;
  106. } else if (doing == DoingFilterPrefix) {
  107. this->OptionFilterPrefix = arg;
  108. doing = DoingNone;
  109. }
  110. }
  111. // Extract the real command line.
  112. if (arg0) {
  113. this->RealArgC = argc - arg0;
  114. this->RealArgV = argv + arg0;
  115. for (int i = 0; i < this->RealArgC; ++i) {
  116. this->HandleRealArg(this->RealArgV[i]);
  117. }
  118. return true;
  119. }
  120. this->RealArgC = 0;
  121. this->RealArgV = CM_NULLPTR;
  122. std::cerr << "No launch/command separator ('--') found!\n";
  123. return false;
  124. }
  125. void cmCTestLaunch::HandleRealArg(const char* arg)
  126. {
  127. #ifdef _WIN32
  128. // Expand response file arguments.
  129. if (arg[0] == '@' && cmSystemTools::FileExists(arg + 1)) {
  130. cmsys::ifstream fin(arg + 1);
  131. std::string line;
  132. while (cmSystemTools::GetLineFromStream(fin, line)) {
  133. cmSystemTools::ParseWindowsCommandLine(line.c_str(), this->RealArgs);
  134. }
  135. return;
  136. }
  137. #endif
  138. this->RealArgs.push_back(arg);
  139. }
  140. void cmCTestLaunch::ComputeFileNames()
  141. {
  142. // We just passthru the behavior of the real command unless the
  143. // CTEST_LAUNCH_LOGS environment variable is set.
  144. const char* d = getenv("CTEST_LAUNCH_LOGS");
  145. if (!(d && *d)) {
  146. return;
  147. }
  148. this->Passthru = false;
  149. // The environment variable specifies the directory into which we
  150. // generate build logs.
  151. this->LogDir = d;
  152. cmSystemTools::ConvertToUnixSlashes(this->LogDir);
  153. this->LogDir += "/";
  154. // We hash the input command working dir and command line to obtain
  155. // a repeatable and (probably) unique name for log files.
  156. cmCryptoHash md5(cmCryptoHash::AlgoMD5);
  157. md5.Initialize();
  158. md5.Append(this->CWD);
  159. for (std::vector<std::string>::const_iterator ai = this->RealArgs.begin();
  160. ai != this->RealArgs.end(); ++ai) {
  161. md5.Append(*ai);
  162. }
  163. this->LogHash = md5.FinalizeHex();
  164. // We store stdout and stderr in temporary log files.
  165. this->LogOut = this->LogDir;
  166. this->LogOut += "launch-";
  167. this->LogOut += this->LogHash;
  168. this->LogOut += "-out.txt";
  169. this->LogErr = this->LogDir;
  170. this->LogErr += "launch-";
  171. this->LogErr += this->LogHash;
  172. this->LogErr += "-err.txt";
  173. }
  174. void cmCTestLaunch::RunChild()
  175. {
  176. // Ignore noopt make rules
  177. if (this->RealArgs.empty() || this->RealArgs[0] == ":") {
  178. this->ExitCode = 0;
  179. return;
  180. }
  181. // Prepare to run the real command.
  182. cmsysProcess* cp = this->Process;
  183. cmsysProcess_SetCommand(cp, this->RealArgV);
  184. cmsys::ofstream fout;
  185. cmsys::ofstream ferr;
  186. if (this->Passthru) {
  187. // In passthru mode we just share the output pipes.
  188. cmsysProcess_SetPipeShared(cp, cmsysProcess_Pipe_STDOUT, 1);
  189. cmsysProcess_SetPipeShared(cp, cmsysProcess_Pipe_STDERR, 1);
  190. } else {
  191. // In full mode we record the child output pipes to log files.
  192. fout.open(this->LogOut.c_str(), std::ios::out | std::ios::binary);
  193. ferr.open(this->LogErr.c_str(), std::ios::out | std::ios::binary);
  194. }
  195. #ifdef _WIN32
  196. // Do this so that newline transformation is not done when writing to cout
  197. // and cerr below.
  198. _setmode(fileno(stdout), _O_BINARY);
  199. _setmode(fileno(stderr), _O_BINARY);
  200. #endif
  201. // Run the real command.
  202. cmsysProcess_Execute(cp);
  203. // Record child stdout and stderr if necessary.
  204. if (!this->Passthru) {
  205. char* data = CM_NULLPTR;
  206. int length = 0;
  207. cmProcessOutput processOutput;
  208. std::string strdata;
  209. while (int p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR)) {
  210. if (p == cmsysProcess_Pipe_STDOUT) {
  211. processOutput.DecodeText(data, length, strdata, 1);
  212. fout.write(strdata.c_str(), strdata.size());
  213. std::cout.write(strdata.c_str(), strdata.size());
  214. this->HaveOut = true;
  215. } else if (p == cmsysProcess_Pipe_STDERR) {
  216. processOutput.DecodeText(data, length, strdata, 2);
  217. ferr.write(strdata.c_str(), strdata.size());
  218. std::cerr.write(strdata.c_str(), strdata.size());
  219. this->HaveErr = true;
  220. }
  221. }
  222. processOutput.DecodeText(std::string(), strdata, 1);
  223. if (!strdata.empty()) {
  224. fout.write(strdata.c_str(), strdata.size());
  225. std::cout.write(strdata.c_str(), strdata.size());
  226. }
  227. processOutput.DecodeText(std::string(), strdata, 2);
  228. if (!strdata.empty()) {
  229. ferr.write(strdata.c_str(), strdata.size());
  230. std::cerr.write(strdata.c_str(), strdata.size());
  231. }
  232. }
  233. // Wait for the real command to finish.
  234. cmsysProcess_WaitForExit(cp, CM_NULLPTR);
  235. this->ExitCode = cmsysProcess_GetExitValue(cp);
  236. }
  237. int cmCTestLaunch::Run()
  238. {
  239. if (!this->Process) {
  240. std::cerr << "Could not allocate cmsysProcess instance!\n";
  241. return -1;
  242. }
  243. this->RunChild();
  244. if (this->CheckResults()) {
  245. return this->ExitCode;
  246. }
  247. this->LoadConfig();
  248. this->WriteXML();
  249. return this->ExitCode;
  250. }
  251. void cmCTestLaunch::LoadLabels()
  252. {
  253. if (this->OptionBuildDir.empty() || this->OptionTargetName.empty()) {
  254. return;
  255. }
  256. // Labels are listed in per-target files.
  257. std::string fname = this->OptionBuildDir;
  258. fname += cmake::GetCMakeFilesDirectory();
  259. fname += "/";
  260. fname += this->OptionTargetName;
  261. fname += ".dir/Labels.txt";
  262. // We are interested in per-target labels for this source file.
  263. std::string source = this->OptionSource;
  264. cmSystemTools::ConvertToUnixSlashes(source);
  265. // Load the labels file.
  266. cmsys::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
  267. if (!fin) {
  268. return;
  269. }
  270. bool inTarget = true;
  271. bool inSource = false;
  272. std::string line;
  273. while (cmSystemTools::GetLineFromStream(fin, line)) {
  274. if (line.empty() || line[0] == '#') {
  275. // Ignore blank and comment lines.
  276. continue;
  277. }
  278. if (line[0] == ' ') {
  279. // Label lines appear indented by one space.
  280. if (inTarget || inSource) {
  281. this->Labels.insert(line.c_str() + 1);
  282. }
  283. } else if (!this->OptionSource.empty() && !inSource) {
  284. // Non-indented lines specify a source file name. The first one
  285. // is the end of the target-wide labels. Use labels following a
  286. // matching source.
  287. inTarget = false;
  288. inSource = this->SourceMatches(line, source);
  289. } else {
  290. return;
  291. }
  292. }
  293. }
  294. bool cmCTestLaunch::SourceMatches(std::string const& lhs,
  295. std::string const& rhs)
  296. {
  297. // TODO: Case sensitivity, UseRelativePaths, etc. Note that both
  298. // paths in the comparison get generated by CMake. This is done for
  299. // every source in the target, so it should be efficient (cannot use
  300. // cmSystemTools::IsSameFile).
  301. return lhs == rhs;
  302. }
  303. bool cmCTestLaunch::IsError() const
  304. {
  305. return this->ExitCode != 0;
  306. }
  307. void cmCTestLaunch::WriteXML()
  308. {
  309. // Name the xml file.
  310. std::string logXML = this->LogDir;
  311. logXML += this->IsError() ? "error-" : "warning-";
  312. logXML += this->LogHash;
  313. logXML += ".xml";
  314. // Use cmGeneratedFileStream to atomically create the report file.
  315. cmGeneratedFileStream fxml(logXML.c_str());
  316. cmXMLWriter xml(fxml, 2);
  317. xml.StartElement("Failure");
  318. xml.Attribute("type", this->IsError() ? "Error" : "Warning");
  319. this->WriteXMLAction(xml);
  320. this->WriteXMLCommand(xml);
  321. this->WriteXMLResult(xml);
  322. this->WriteXMLLabels(xml);
  323. xml.EndElement(); // Failure
  324. }
  325. void cmCTestLaunch::WriteXMLAction(cmXMLWriter& xml)
  326. {
  327. xml.Comment("Meta-information about the build action");
  328. xml.StartElement("Action");
  329. // TargetName
  330. if (!this->OptionTargetName.empty()) {
  331. xml.Element("TargetName", this->OptionTargetName);
  332. }
  333. // Language
  334. if (!this->OptionLanguage.empty()) {
  335. xml.Element("Language", this->OptionLanguage);
  336. }
  337. // SourceFile
  338. if (!this->OptionSource.empty()) {
  339. std::string source = this->OptionSource;
  340. cmSystemTools::ConvertToUnixSlashes(source);
  341. // If file is in source tree use its relative location.
  342. if (cmSystemTools::FileIsFullPath(this->SourceDir.c_str()) &&
  343. cmSystemTools::FileIsFullPath(source.c_str()) &&
  344. cmSystemTools::IsSubDirectory(source, this->SourceDir)) {
  345. source =
  346. cmSystemTools::RelativePath(this->SourceDir.c_str(), source.c_str());
  347. }
  348. xml.Element("SourceFile", source);
  349. }
  350. // OutputFile
  351. if (!this->OptionOutput.empty()) {
  352. xml.Element("OutputFile", this->OptionOutput);
  353. }
  354. // OutputType
  355. const char* outputType = CM_NULLPTR;
  356. if (!this->OptionTargetType.empty()) {
  357. if (this->OptionTargetType == "EXECUTABLE") {
  358. outputType = "executable";
  359. } else if (this->OptionTargetType == "SHARED_LIBRARY") {
  360. outputType = "shared library";
  361. } else if (this->OptionTargetType == "MODULE_LIBRARY") {
  362. outputType = "module library";
  363. } else if (this->OptionTargetType == "STATIC_LIBRARY") {
  364. outputType = "static library";
  365. }
  366. } else if (!this->OptionSource.empty()) {
  367. outputType = "object file";
  368. }
  369. if (outputType) {
  370. xml.Element("OutputType", outputType);
  371. }
  372. xml.EndElement(); // Action
  373. }
  374. void cmCTestLaunch::WriteXMLCommand(cmXMLWriter& xml)
  375. {
  376. xml.Comment("Details of command");
  377. xml.StartElement("Command");
  378. if (!this->CWD.empty()) {
  379. xml.Element("WorkingDirectory", this->CWD);
  380. }
  381. for (std::vector<std::string>::const_iterator ai = this->RealArgs.begin();
  382. ai != this->RealArgs.end(); ++ai) {
  383. xml.Element("Argument", *ai);
  384. }
  385. xml.EndElement(); // Command
  386. }
  387. void cmCTestLaunch::WriteXMLResult(cmXMLWriter& xml)
  388. {
  389. xml.Comment("Result of command");
  390. xml.StartElement("Result");
  391. // StdOut
  392. xml.StartElement("StdOut");
  393. this->DumpFileToXML(xml, this->LogOut);
  394. xml.EndElement(); // StdOut
  395. // StdErr
  396. xml.StartElement("StdErr");
  397. this->DumpFileToXML(xml, this->LogErr);
  398. xml.EndElement(); // StdErr
  399. // ExitCondition
  400. xml.StartElement("ExitCondition");
  401. cmsysProcess* cp = this->Process;
  402. switch (cmsysProcess_GetState(cp)) {
  403. case cmsysProcess_State_Starting:
  404. xml.Content("No process has been executed");
  405. break;
  406. case cmsysProcess_State_Executing:
  407. xml.Content("The process is still executing");
  408. break;
  409. case cmsysProcess_State_Disowned:
  410. xml.Content("Disowned");
  411. break;
  412. case cmsysProcess_State_Killed:
  413. xml.Content("Killed by parent");
  414. break;
  415. case cmsysProcess_State_Expired:
  416. xml.Content("Killed when timeout expired");
  417. break;
  418. case cmsysProcess_State_Exited:
  419. xml.Content(this->ExitCode);
  420. break;
  421. case cmsysProcess_State_Exception:
  422. xml.Content("Terminated abnormally: ");
  423. xml.Content(cmsysProcess_GetExceptionString(cp));
  424. break;
  425. case cmsysProcess_State_Error:
  426. xml.Content("Error administrating child process: ");
  427. xml.Content(cmsysProcess_GetErrorString(cp));
  428. break;
  429. };
  430. xml.EndElement(); // ExitCondition
  431. xml.EndElement(); // Result
  432. }
  433. void cmCTestLaunch::WriteXMLLabels(cmXMLWriter& xml)
  434. {
  435. this->LoadLabels();
  436. if (!this->Labels.empty()) {
  437. xml.Comment("Interested parties");
  438. xml.StartElement("Labels");
  439. for (std::set<std::string>::const_iterator li = this->Labels.begin();
  440. li != this->Labels.end(); ++li) {
  441. xml.Element("Label", *li);
  442. }
  443. xml.EndElement(); // Labels
  444. }
  445. }
  446. void cmCTestLaunch::DumpFileToXML(cmXMLWriter& xml, std::string const& fname)
  447. {
  448. cmsys::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
  449. std::string line;
  450. const char* sep = "";
  451. while (cmSystemTools::GetLineFromStream(fin, line)) {
  452. if (MatchesFilterPrefix(line)) {
  453. continue;
  454. }
  455. xml.Content(sep);
  456. xml.Content(line);
  457. sep = "\n";
  458. }
  459. }
  460. bool cmCTestLaunch::CheckResults()
  461. {
  462. // Skip XML in passthru mode.
  463. if (this->Passthru) {
  464. return true;
  465. }
  466. // We always report failure for error conditions.
  467. if (this->IsError()) {
  468. return false;
  469. }
  470. // Scrape the output logs to look for warnings.
  471. if ((this->HaveErr && this->ScrapeLog(this->LogErr)) ||
  472. (this->HaveOut && this->ScrapeLog(this->LogOut))) {
  473. return false;
  474. }
  475. return true;
  476. }
  477. void cmCTestLaunch::LoadScrapeRules()
  478. {
  479. if (this->ScrapeRulesLoaded) {
  480. return;
  481. }
  482. this->ScrapeRulesLoaded = true;
  483. // Common compiler warning formats. These are much simpler than the
  484. // full log-scraping expressions because we do not need to extract
  485. // file and line information.
  486. this->RegexWarning.push_back("(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]");
  487. this->RegexWarning.push_back("(^|[ :])[Rr][Ee][Mm][Aa][Rr][Kk]");
  488. this->RegexWarning.push_back("(^|[ :])[Nn][Oo][Tt][Ee]");
  489. // Load custom match rules given to us by CTest.
  490. this->LoadScrapeRules("Warning", this->RegexWarning);
  491. this->LoadScrapeRules("WarningSuppress", this->RegexWarningSuppress);
  492. }
  493. void cmCTestLaunch::LoadScrapeRules(
  494. const char* purpose, std::vector<cmsys::RegularExpression>& regexps)
  495. {
  496. std::string fname = this->LogDir;
  497. fname += "Custom";
  498. fname += purpose;
  499. fname += ".txt";
  500. cmsys::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
  501. std::string line;
  502. cmsys::RegularExpression rex;
  503. while (cmSystemTools::GetLineFromStream(fin, line)) {
  504. if (rex.compile(line.c_str())) {
  505. regexps.push_back(rex);
  506. }
  507. }
  508. }
  509. bool cmCTestLaunch::ScrapeLog(std::string const& fname)
  510. {
  511. this->LoadScrapeRules();
  512. // Look for log file lines matching warning expressions but not
  513. // suppression expressions.
  514. cmsys::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
  515. std::string line;
  516. while (cmSystemTools::GetLineFromStream(fin, line)) {
  517. if (MatchesFilterPrefix(line)) {
  518. continue;
  519. }
  520. if (this->Match(line, this->RegexWarning) &&
  521. !this->Match(line, this->RegexWarningSuppress)) {
  522. return true;
  523. }
  524. }
  525. return false;
  526. }
  527. bool cmCTestLaunch::Match(std::string const& line,
  528. std::vector<cmsys::RegularExpression>& regexps)
  529. {
  530. for (std::vector<cmsys::RegularExpression>::iterator ri = regexps.begin();
  531. ri != regexps.end(); ++ri) {
  532. if (ri->find(line.c_str())) {
  533. return true;
  534. }
  535. }
  536. return false;
  537. }
  538. bool cmCTestLaunch::MatchesFilterPrefix(std::string const& line) const
  539. {
  540. return !this->OptionFilterPrefix.empty() &&
  541. cmSystemTools::StringStartsWith(line, this->OptionFilterPrefix.c_str());
  542. }
  543. int cmCTestLaunch::Main(int argc, const char* const argv[])
  544. {
  545. if (argc == 2) {
  546. std::cerr << "ctest --launch: this mode is for internal CTest use only"
  547. << std::endl;
  548. return 1;
  549. }
  550. cmCTestLaunch self(argc, argv);
  551. return self.Run();
  552. }
  553. void cmCTestLaunch::LoadConfig()
  554. {
  555. cmake cm(cmake::RoleScript);
  556. cm.SetHomeDirectory("");
  557. cm.SetHomeOutputDirectory("");
  558. cm.GetCurrentSnapshot().SetDefaultDefinitions();
  559. cmGlobalGenerator gg(&cm);
  560. CM_AUTO_PTR<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot()));
  561. std::string fname = this->LogDir;
  562. fname += "CTestLaunchConfig.cmake";
  563. if (cmSystemTools::FileExists(fname.c_str()) &&
  564. mf->ReadListFile(fname.c_str())) {
  565. this->SourceDir = mf->GetSafeDefinition("CTEST_SOURCE_DIRECTORY");
  566. cmSystemTools::ConvertToUnixSlashes(this->SourceDir);
  567. }
  568. }