From: Navarrop Date: Mon, 1 Aug 2011 09:25:03 +0000 (+0200) Subject: Make a tesh file for ns3. X-Git-Tag: v3_6_2~184 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9a8ce506851427358a58031d014dc51b353e4baa Make a tesh file for ns3. --- diff --git a/buildtools/Cmake/AddTests.cmake b/buildtools/Cmake/AddTests.cmake index a923771ffb..298258fb60 100644 --- a/buildtools/Cmake/AddTests.cmake +++ b/buildtools/Cmake/AddTests.cmake @@ -363,6 +363,12 @@ endif(HAVE_RAWCTX) endif(HAVE_TRACING) endif(HAVE_GTNETS) +if(HAVE_NS3) +ADD_TEST(msg-ns3-thread ${CMAKE_BINARY_DIR}/bin/tesh --cfg contexts/factory:thread --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/ns3.tesh) +ADD_TEST(msg-ns3-ucontext ${CMAKE_BINARY_DIR}/bin/tesh --cfg contexts/factory:ucontext --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/ns3.tesh) +ADD_TEST(msg-ns3-raw ${CMAKE_BINARY_DIR}/bin/tesh --cfg contexts/factory:raw --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/ns3.tesh) +endif(HAVE_NS3) + IF(HAVE_TRACING) ADD_TEST(tracing-ms ${CMAKE_BINARY_DIR}/bin/tesh --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/ms.tesh) ADD_TEST(tracing-categories ${CMAKE_BINARY_DIR}/bin/tesh --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/categories.tesh) diff --git a/examples/msg/ns3/One_cluster.xml b/examples/msg/ns3/One_cluster.xml index a638eae8f3..51716429d1 100644 --- a/examples/msg/ns3/One_cluster.xml +++ b/examples/msg/ns3/One_cluster.xml @@ -5,15 +5,15 @@ | router | ____________|__________|_____________ backbone | | | | | | - l0| l1| l2| l97| l96 | | l99 + l0| l1| l2| l7| l6 | | l9 | | | ........ | | | | | - c-0.me c-99.me + c-0.me c-9.me --> diff --git a/examples/msg/ns3/Two_clusters-d.xml b/examples/msg/ns3/Two_clusters-d.xml index 2921183399..3b55cc98be 100644 --- a/examples/msg/ns3/Two_clusters-d.xml +++ b/examples/msg/ns3/Two_clusters-d.xml @@ -2,13 +2,13 @@ - + - + - + diff --git a/examples/msg/ns3/Two_clusters.xml b/examples/msg/ns3/Two_clusters.xml index 03810af1d5..0aa41eabef 100644 --- a/examples/msg/ns3/Two_clusters.xml +++ b/examples/msg/ns3/Two_clusters.xml @@ -9,28 +9,28 @@ | router1 | | ____________|__________|_____________ csma1 | | | | | | | |backbone - l0| l1| l2| l97| l98| | l99 | + l0| l1| l2| l7| l8| | l9 | | | | ........ | | | | | | | - c-0.me c-99.me | + c-0.me c-9.me | ___________________________________________________| ___|______ | | | router2 | ____________|__________|_____________ csma2 | | | | | | - l100|l101| | l197| l198| | l199 + l10 | l11| | l17| l18| | l19 | | | ........ | | | | | - c-100.me c-199.me + c-10.me c-19.me --> diff --git a/examples/msg/ns3/ns3.tesh b/examples/msg/ns3/ns3.tesh new file mode 100644 index 0000000000..02c6cb694c --- /dev/null +++ b/examples/msg/ns3/ns3.tesh @@ -0,0 +1,31 @@ +#! ./tesh + +p 3hosts 2links + +$ ns3/ns3 ${srcdir:=.}/ns3/3hosts_2links_p.xml ${srcdir:=.}/ns3/3hosts_2links_d.xml --cfg=network/model:NS3 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' +> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) +> [c:slave:(2) 0.700000] [msg_test/INFO] FLOW[1] : Receive 100 bytes from a to c + +p 6hosts 3links + +$ ns3/ns3 ${srcdir:=.}/ns3/3links-p.xml ${srcdir:=.}/ns3/3links-d.xml --cfg=network/model:NS3 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' +> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) +> [C1:slave:(2) 0.392000] [msg_test/INFO] FLOW[1] : Receive 100 bytes from S1 to C1 +> [C2:slave:(4) 1.354000] [msg_test/INFO] FLOW[2] : Receive 1000 bytes from S2 to C2 +> [C3:slave:(6) 2.438000] [msg_test/INFO] FLOW[3] : Receive 2000 bytes from S3 to C3 + +p One cluster + +$ ns3/ns3 ${srcdir:=.}/ns3/One_cluster.xml ${srcdir:=.}/ns3/One_cluster-d.xml --cfg=network/model:NS3 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' +> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) +> [c-6.me:slave:(2) 0.006614] [msg_test/INFO] FLOW[1] : Receive 100 bytes from c-2.me to c-6.me + +p Two clusters + +$ ns3/ns3 ${srcdir:=.}/ns3/Two_clusters.xml ${srcdir:=.}/ns3/Two_clusters-d.xml --cfg=network/model:NS3 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' +> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) +> [c-16.me:slave:(2) 0.012453] [msg_test/INFO] FLOW[1] : Receive 100 bytes from c-3.me to c-16.me \ No newline at end of file