Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add tests for code covergae.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 8 Feb 2011 16:08:04 +0000 (16:08 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 8 Feb 2011 16:08:04 +0000 (16:08 +0000)
Tests for :
get_network_element_type(key)
Model Dijkstra

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9589 48e7efb5-ca39-0410-a469-dd3cf9ba447f

teshsuite/simdag/platforms/Dijkstra.xml [new file with mode: 0644]
teshsuite/simdag/platforms/basic_parsing_test.tesh
teshsuite/simdag/platforms/basic_parsing_test_sym_full.tesh
teshsuite/simdag/platforms/is_router_test.c

diff --git a/teshsuite/simdag/platforms/Dijkstra.xml b/teshsuite/simdag/platforms/Dijkstra.xml
new file mode 100644 (file)
index 0000000..f66ad8b
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+ <AS  id="AS0"  routing="Dijkstra">
+
+   <host id="NODO01" power="10000000"/>
+   <host id="NODO02" power="10000000"/>
+   
+   <router id="ROUTER" />
+   
+   <link id="1" bandwidth="1000000" latency="1.0e-03"/>
+   <link id="2" bandwidth="1000000" latency="1.0e-03"/>
+   
+   <link id="10" bandwidth="1000000" latency="1.0e-03"/>
+   <link id="11" bandwidth="1000000" latency="1.0e-03"/>
+   <link id="12" bandwidth="1000000" latency="1.0e-03"/>
+      
+   <route src="NODO01" dst="ROUTER" symmetrical="NO"><link_ctn id="1"/></route>
+   <route src="NODO02" dst="ROUTER" symmetrical="NO"><link_ctn id="2"/></route>
+   
+   <route src="ROUTER" dst="NODO01" symmetrical="NO"><link_ctn id="1"/></route>
+   <route src="ROUTER" dst="NODO02" symmetrical="NO"><link_ctn id="2"/></route>
+
+   <route src="NODO01" dst="NODO02" symmetrical="NO">
+       <link_ctn id="10"/>
+       <link_ctn id="11"/>
+       <link_ctn id="12"/>
+   </route>
+
+ </AS>
+</platform>
\ No newline at end of file
index 36ee7cd..664d4f8 100644 (file)
@@ -93,4 +93,33 @@ $ ${bindir:=.}/basic_parsing_test ./properties.xml --cfg=cpu/model:CpuTI
 
 $ ${bindir:=.}/basic_parsing_test ./one_cluster_file.xml
 > [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
 
 $ ${bindir:=.}/basic_parsing_test ./one_cluster_file.xml
 > [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
-> Workstation number: 2, link number: 5
\ No newline at end of file
+> Workstation number: 2, link number: 5
+
+$ ${bindir:=.}/is_router_test ./test_of_is_router.xml
+> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> Workstation number: 12, link number: 1, elmts number: 25
+>    - Seen: "host01" is type : 1
+>    - Seen: "host02" is type : 1
+>    - Seen: "host03" is type : 1
+>    - Seen: "host04" is type : 1
+>    - Seen: "host05" is type : 1
+>    - Seen: "host06" is type : 1
+>    - Seen: "host07" is type : 1
+>    - Seen: "host08" is type : 1
+>    - Seen: "host09" is type : 1
+>    - Seen: "router1" is type : 2
+>    - Seen: "router2" is type : 2
+>    - Seen: "router3" is type : 2
+>    - Seen: "router4" is type : 2
+>    - Seen: "router5" is type : 2
+>    - Seen: "router6" is type : 2
+>    - Seen: "host10" is type : 1
+>    - Seen: "host11" is type : 1
+>    - Seen: "host12" is type : 1
+>    - Seen: "AS0" is type : 3
+>    - Seen: "AS1" is type : 3
+>    - Seen: "AS2" is type : 3
+>    - Seen: "AS3" is type : 3
+>    - Seen: "AS4" is type : 3
+>    - Seen: "AS5" is type : 3
+>    - Seen: "AS" is type : 3
\ No newline at end of file
index 790c9d1..c26faa4 100644 (file)
@@ -328,3 +328,25 @@ $ ${bindir:=.}/basic_parsing_test two_hosts_one_link_fullduplex.xml FULL_LINK "-
 >      Route size 1
 >      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
 >      Route latency = 0.000015, route bandwidth = 498000000.000000
 >      Route size 1
 >      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
 >      Route latency = 0.000015, route bandwidth = 498000000.000000
+
+$ ${bindir:=.}/basic_parsing_test Dijkstra.xml FULL_LINK --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n
+> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> Workstation number: 2, link number: 6
+> Route between NODO01 and NODO01
+>      Route size 1
+>      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>      Route latency = 0.000015, route bandwidth = 498000000.000000
+> Route between NODO01 and NODO02
+>      Route size 2
+>      Link 1: latency = 0.001000, bandwidth = 1000000.000000
+>      Link 2: latency = 0.001000, bandwidth = 1000000.000000
+>      Route latency = 0.002000, route bandwidth = 1000000.000000
+> Route between NODO02 and NODO01
+>      Route size 2
+>      Link 2: latency = 0.001000, bandwidth = 1000000.000000
+>      Link 1: latency = 0.001000, bandwidth = 1000000.000000
+>      Route latency = 0.002000, route bandwidth = 1000000.000000
+> Route between NODO02 and NODO02
+>      Route size 1
+>      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>      Route latency = 0.000015, route bandwidth = 498000000.000000
index 60f3b5b..0c8fada 100644 (file)
@@ -33,8 +33,6 @@ int main(int argc, char **argv)
     printf("   - Seen: \"%s\" is type : %d\n", key,
            (int) global_routing->get_network_element_type(key));
   }
     printf("   - Seen: \"%s\" is type : %d\n", key,
            (int) global_routing->get_network_element_type(key));
   }
-  //printf("%s is router : %d\n",name1,global_routing->is_router(name1));
-  xbt_dict_free(&eltms);
   SD_exit();
   return 0;
 }
   SD_exit();
   return 0;
 }