From: suter Date: Thu, 4 Oct 2012 08:29:34 +0000 (+0200) Subject: modify the test to not die poorly anymore. Just gently exit with an X-Git-Tag: v3_8~143^2~7 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/aa2fc645f02f951d8ce50b2c3fb075967b42c6aa modify the test to not die poorly anymore. Just gently exit with an error message. --- diff --git a/examples/simdag/dax/dax_test.c b/examples/simdag/dax/dax_test.c index 2a873d1288..f27ba96651 100644 --- a/examples/simdag/dax/dax_test.c +++ b/examples/simdag/dax/dax_test.c @@ -58,9 +58,12 @@ int main(int argc, char **argv) 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); - xbt_die("A problem occurred during parsing. The simulation can't continue."); + SD_exit(); + return -1; } /* Display all the tasks */ diff --git a/examples/simdag/dax/simple_dax_with_cycle.tesh b/examples/simdag/dax/simple_dax_with_cycle.tesh index 7b0e42aea8..99d94c6dde 100644 --- a/examples/simdag/dax/simple_dax_with_cycle.tesh +++ b/examples/simdag/dax/simple_dax_with_cycle.tesh @@ -1,7 +1,6 @@ #! ./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 @@ -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] [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