From c418e3fb375e1e0197b0567939aa8e305232ef26 Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Thu, 1 Sep 2016 09:46:57 +0000
Subject: [PATCH] ooc test: create a ooc subdirectory in the build dir to write
 data on disk instead of /tmp/starpu_ooc because we must guarantee that the
 directory exists

---
 example/out_of_core/CTestLists.cmake | 4 ++++
 example/out_of_core/out_of_core.c    | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/example/out_of_core/CTestLists.cmake b/example/out_of_core/CTestLists.cmake
index 1d02adac6..1ca4036bd 100644
--- a/example/out_of_core/CTestLists.cmake
+++ b/example/out_of_core/CTestLists.cmake
@@ -6,6 +6,10 @@ set(TESTLIST
     out_of_core
     )
 
+# OOC tests required to create a directory where the data will be written on disk
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ooc)
+
+# define tests
 foreach(test ${TESTLIST})
     add_test(example_ooc_${test} ./${test})
 endforeach()
diff --git a/example/out_of_core/out_of_core.c b/example/out_of_core/out_of_core.c
index 254e79410..7f95bf6c5 100644
--- a/example/out_of_core/out_of_core.c
+++ b/example/out_of_core/out_of_core.c
@@ -96,7 +96,7 @@ int main(int argc, char *argv[]) {
     /* limit ram memory */
     if (iparam[IPARAM_OUTOFCORE] > 0) {
         int new_dd = starpu_disk_register (&starpu_disk_unistd_o_direct_ops,
-                                           (void*) "/tmp/starpu_ooc/", 1024*1024*10);
+                                           (void*) "./ooc/", 1024*1024*10);
     }
 
     MORSE_Desc_Create_User(&descA, NULL, MorseRealDouble,
-- 
GitLab