Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
modify the test to not die poorly anymore. Just gently exit with an
authorsuter <frederic.suter@cc.in2p3.fr>
Thu, 4 Oct 2012 08:29:34 +0000 (10:29 +0200)
committersuter <frederic.suter@cc.in2p3.fr>
Thu, 4 Oct 2012 09:21:12 +0000 (11:21 +0200)
error message.

examples/simdag/dax/dax_test.c
examples/simdag/dax/simple_dax_with_cycle.tesh

index 2a873d1..f27ba96 100644 (file)
@@ -58,9 +58,12 @@ int main(int argc, char **argv)
   SD_create_environment(argv[1]);
 
   /* load the DAX file */
   SD_create_environment(argv[1]);
 
   /* load the DAX file */
-  if (!(dax = SD_daxload(argv[2]))){
+  dax = SD_daxload(argv[2]);
+  if (!dax){
+    XBT_ERROR("A problem occurred during DAX parsing (cycle or syntax). Do not continue this test");
     free(tracefilename);
     free(tracefilename);
-    xbt_die("A problem occurred during parsing. The simulation can't continue.");
+    SD_exit();
+    return -1;
   }
 
   /* Display all the tasks */
   }
 
   /* Display all the tasks */
index 7b0e42a..99d94c6 100644 (file)
@@ -1,7 +1,6 @@
 #! ./tesh
 p Test the DAX loader with a DAX comprising a cycle.
 
 #! ./tesh
 p Test the DAX loader with a DAX comprising a cycle.
 
-! expect signal SIGABRT
 $ $SG_TEST_EXENV ./dax_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/simple_dax_with_cycle.xml
 > [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
 > [0.000000] [sd_daxparse/WARNING] the task root is not marked
 $ $SG_TEST_EXENV ./dax_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/simple_dax_with_cycle.xml
 > [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
 > [0.000000] [sd_daxparse/WARNING] the task root is not marked
@@ -9,4 +8,4 @@ $ $SG_TEST_EXENV ./dax_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_daxparse/WARNING] the task 2@task2 is in a cycle
 > [0.000000] [sd_daxparse/WARNING] the task 3@task3 is in a cycle
 > [0.000000] [sd_daxparse/ERROR] The DAX described in simple_dax_with_cycle.xml is not a DAG. It contains a cycle.
 > [0.000000] [sd_daxparse/WARNING] the task 2@task2 is in a cycle
 > [0.000000] [sd_daxparse/WARNING] the task 3@task3 is in a cycle
 > [0.000000] [sd_daxparse/ERROR] The DAX described in simple_dax_with_cycle.xml is not a DAG. It contains a cycle.
-> [0.000000] [xbt/CRITICAL] A problem occurred during parsing. The simulation can't continue.
+> [0.000000] [test/ERROR] A problem occurred during DAX parsing (cycle or syntax). Do not continue this test