Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix out of dir builds
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 3 Dec 2017 08:49:30 +0000 (09:49 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 3 Dec 2017 08:49:30 +0000 (09:49 +0100)
examples/s4u/CMakeLists.txt
examples/s4u/io/s4u-io.cpp
examples/s4u/io/s4u-io.tesh

index 1a15301..f91d364 100644 (file)
@@ -77,6 +77,6 @@ foreach(example actions-comm actions-storage
   ADD_TESH_FACTORIES(s4u-${example} "thread;ucontext;raw;boost" 
                                     --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} 
                                    --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
-                                   --cd ${CMAKE_CURRENT_BINARY_DIR}/${example} 
+                                   --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example} 
                                    ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh)
 endforeach()
index dc3e5e3..ac0ff0f 100644 (file)
@@ -84,7 +84,10 @@ int main(int argc, char **argv)
 {
   simgrid::s4u::Engine e(&argc, argv);
   sg_storage_file_system_init();
-  e.loadPlatform("../../platforms/storage/storage.xml");
+  const char* platffile = "../../platforms/storage/storage.xml";
+  if (argc > 1)
+    platffile = argv[1];
+  e.loadPlatform(platffile);
   simgrid::s4u::Actor::createActor("host", simgrid::s4u::Host::by_name("denise"), MyHost());
   e.run();
 
index 29188d7..f00cee2 100644 (file)
@@ -1,6 +1,6 @@
 #! ./tesh
 
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-io
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-io ${platfdir}/storage/storage.xml
 > [denise:host:(1) 0.000000] [s4u_test/INFO] Storage info on denise:
 > [denise:host:(1) 0.000000] [s4u_test/INFO]     Disk2 (c:) Used: 2391537133; Free: 534479374867; Total: 536870912000.
 > [denise:host:(1) 0.000000] [s4u_test/INFO]     Disk4 (/home) Used: 13221994; Free: 536857690006; Total: 536870912000.