Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
test also the dotloader with a file that comprises a cycle.
authorsuter <frederic.suter@cc.in2p3.fr>
Tue, 26 Jun 2012 11:15:56 +0000 (13:15 +0200)
committersuter <frederic.suter@cc.in2p3.fr>
Tue, 26 Jun 2012 11:15:56 +0000 (13:15 +0200)
examples/simdag/dot/dot_test.c
examples/simdag/dot/test_simdag_dotload.tesh

index def253b..b94ff9f 100644 (file)
@@ -50,8 +50,7 @@ int main(int argc, char **argv)
   /* load the DOT file */
   dot = SD_dotload(argv[2]);
   if(dot == NULL){
   /* load the DOT file */
   dot = SD_dotload(argv[2]);
   if(dot == NULL){
-    XBT_INFO("No dot load may be you have a cycle in your graph");
-    return -1;
+    xbt_die("No dot load may be you have a cycle in your graph");
   }
 
   /* Display all the tasks */
   }
 
   /* Display all the tasks */
index 0971975..5a6aae0 100644 (file)
@@ -470,3 +470,17 @@ $ cat ${srcdir:=.}/dag_with_good_schedule.trace
 > [18.001306] C2-05 compute 0.000000 # end
 
 $ rm -f ${srcdir:=.}/dag_with_good_schedule.trace
 > [18.001306] C2-05 compute 0.000000 # end
 
 $ rm -f ${srcdir:=.}/dag_with_good_schedule.trace
+
+! expect signal SIGABRT
+$ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/dag_with_cycle.dot
+> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [sd_daxparse/WARNING] the task root is not marked
+> [0.000000] [sd_daxparse/WARNING] the task 0 is in a cycle
+> [0.000000] [sd_daxparse/WARNING] the task 1 is in a cycle
+> [0.000000] [sd_daxparse/WARNING] the task 2 is in a cycle
+> [0.000000] [sd_daxparse/WARNING] the task 3 is in a cycle
+> [0.000000] [sd_daxparse/WARNING] the task 4 is in a cycle
+> [0.000000] [sd_daxparse/WARNING] the task 5 is in a cycle
+> [0.000000] [sd_daxparse/WARNING] the task 6 is in a cycle
+> [0.000000] [sd_dotparse/ERROR] The DOT described in dag_with_cycle.dot is not a DAG. It contains a cycle.
+> [0.000000] [xbt/CRITICAL] No dot load may be you have a cycle in your graph