Salome HOME
xml dump file is stored in a USER dedicated directory
[modules/yacs.git] / src / engine / Test / engineTest.cxx
index 8f69d57ed91e4ea20e2ba2a22f8533496842ed7a..5c2a7bee2749390a24e4a788a1314f0e4637061c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -39,6 +39,7 @@
 #include <list>
 #include <vector>
 #include <string.h>
+#include <unistd.h>
 
 //#define _DEVDEBUG_
 #include "YacsTrace.hxx"
@@ -1000,7 +1001,10 @@ void EngineTest::RecursiveBlocs_multipleRecursion()
         DEBTRACE("     output port name for graphe = " << _nodeMap["graphe"]->getOutPortName(*it));
       }
     YACS::ENGINE::VisitorSaveState vst(_compoMap["graphe"]);
-    vst.openFileDump("/tmp/RecursiveBlocs_multipleRecursion_dumpState.xml");
+    std::string logDir = std::string("/tmp/")+ getlogin();
+    std::string cmd = "mkdir -p " + logDir;
+    system( cmd.c_str() );
+    vst.openFileDump(logDir + std::string("/RecursiveBlocs_multipleRecursion_dumpState.xml"));
     _compoMap["graphe"]->accept(&vst);
     vst.closeFileDump();
   }