MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / setup

Function setup

tests/unit/test_execution_plan_clone.c:101–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void setup() {
102 // skip if memory sanitizer is enabled
103 if(getenv("SANITIZER") != NULL || getenv("VALGRIND") != NULL) {
104 exit(0);
105 }
106
107 // use the malloc family for allocations
108 Alloc_Reset();
109
110 // Initialize the thread pool.
111 TEST_ASSERT(ThreadPools_CreatePools(1, 1, 2));
112
113 // init query context
114 TEST_ASSERT(QueryCtx_Init());
115
116 // initialize GraphBLAS
117 GrB_init(GrB_NONBLOCKING);
118 GxB_Global_Option_set(GxB_FORMAT, GxB_BY_ROW); // all matrices in CSR format
119
120 Proc_Register(); // register procedures
121 AR_RegisterFuncs(); // register arithmetic functions
122
123 // create a graphcontext
124 _fake_graph_context();
125}
126
127void tearDown() {
128 TEST_ASSERT(GrB_finalize() == GrB_SUCCESS);

Callers

nothing calls this directly

Calls 8

Alloc_ResetFunction · 0.85
ThreadPools_CreatePoolsFunction · 0.85
QueryCtx_InitFunction · 0.85
GrB_initFunction · 0.85
GxB_Global_Option_setFunction · 0.85
Proc_RegisterFunction · 0.85
AR_RegisterFuncsFunction · 0.85
_fake_graph_contextFunction · 0.70

Tested by

no test coverage detected