MCPcopy Create free account
hub / github.com/apache/mesos / SetUp

Method SetUp

src/tests/log_tests.cpp:2454–2473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2452{
2453protected:
2454 void SetUp() override
2455 {
2456 ZooKeeperTest::SetUp();
2457
2458 // Save the current working directory.
2459 cwd = os::getcwd();
2460
2461 // Create a temporary directory for the test.
2462 Try<string> directory = environment->mkdtemp();
2463
2464 ASSERT_SOME(directory) << "Failed to mkdtemp";
2465
2466 sandbox = directory.get();
2467
2468 LOG(INFO) << "Using temporary directory '" << sandbox.get() << "'";
2469
2470 // Run the test out of the temporary directory we created.
2471 ASSERT_SOME(os::chdir(sandbox.get()))
2472 << "Failed to chdir into '" << sandbox.get() << "'";
2473 }
2474
2475 void TearDown() override
2476 {

Callers

nothing calls this directly

Calls 4

mkdtempMethod · 0.80
getcwdFunction · 0.50
chdirFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected