Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2019-05-21 15:51:24 +0300
committerRay Molenkamp <github@lazydodo.com>2019-05-21 15:51:24 +0300
commit0fc97dc73d828b0f2dec16c67dc7a0153e04470f (patch)
tree7b15cbd20ba5f6599c9ba2f65529375e684dccb0 /tests/gtests/blenlib/BLI_task_test.cc
parentfd7352e5a29c8ecfcbacb56e36fefc4428cb9771 (diff)
CTest: Fix Bli_task_test failing on windows.
The task_scheduler was not being explicitly freed, leading to unpredictable behavior when the process was exiting. The test would pass, but would sometimes segfault at process shutdown.
Diffstat (limited to 'tests/gtests/blenlib/BLI_task_test.cc')
-rw-r--r--tests/gtests/blenlib/BLI_task_test.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/gtests/blenlib/BLI_task_test.cc b/tests/gtests/blenlib/BLI_task_test.cc
index ed2fd60a3e9..96c6b572e19 100644
--- a/tests/gtests/blenlib/BLI_task_test.cc
+++ b/tests/gtests/blenlib/BLI_task_test.cc
@@ -27,6 +27,7 @@ static void task_mempool_iter_func(void *userdata, MempoolIterData *item)
TEST(task, MempoolIter)
{
int *data[NUM_ITEMS];
+ BLI_threadapi_init();
BLI_mempool *mempool = BLI_mempool_create(
sizeof(*data[0]), NUM_ITEMS, 32, BLI_MEMPOOL_ALLOW_ITER);
@@ -76,4 +77,5 @@ TEST(task, MempoolIter)
}
BLI_mempool_destroy(mempool);
+ BLI_threadapi_exit();
}