MCPcopy Create free account
hub / github.com/Kitware/CMake / testMakeTempDirectory

Function testMakeTempDirectory

Tests/CMakeLib/testSystemTools.cxx:143–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143static bool testMakeTempDirectory()
144{
145 std::cout << "testMakeTempDirectory()\n";
146
147 static std::string const kTemplate = "testMakeTempDirectory-XXXXXX";
148 std::string tempDir = kTemplate;
149 cmsys::Status status = cmSystemTools::MakeTempDirectory(tempDir);
150 if (!status) {
151 std::cout << "cmSystemTools::MakeTempDirectory failed on \"" << tempDir
152 << "\": " << status.GetString() << '\n';
153 return false;
154 }
155 if (!cmSystemTools::FileIsDirectory(tempDir)) {
156 std::cout << "cmSystemTools::MakeTempDirectory did not create \""
157 << tempDir << '\n';
158 return false;
159 }
160 cmSystemTools::RemoveADirectory(tempDir);
161 ASSERT_TRUE(tempDir != kTemplate);
162 return true;
163}
164
165int testSystemTools(int /*unused*/, char* /*unused*/[])
166{

Callers

nothing calls this directly

Calls 1

GetStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…