MCPcopy Create free account
hub / github.com/attermann/microReticulum / make_test_root

Function make_test_root

test/test_provisioning/test_provisioning.cpp:39–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37static std::string g_test_root;
38
39static std::string make_test_root() {
40 char buf[256];
41 int pid = (int)getpid();
42 snprintf(buf, sizeof(buf), "/tmp/rns_prov_test_%d_%d", pid, ++g_test_counter);
43 mkdir(buf, 0755);
44 return std::string(buf);
45}
46
47static void rm_rf(const std::string& path) {
48 std::string cmd = "rm -rf '" + path + "'";

Callers 1

setUpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected