From: Martin Quinson Date: Sun, 13 Sep 2015 19:52:20 +0000 (+0200) Subject: Cut the dirname in error messages so that the tests remain reproducible X-Git-Tag: v3_12~187^2~25 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f7e7ab4b96a63ab88ab00dc53e2b4eeb74910041 Cut the dirname in error messages so that the tests remain reproducible This was already the case 2 hours ago, but now, do it in a portable way. --- diff --git a/src/simdag/sd_daxloader.c b/src/simdag/sd_daxloader.c index e48ca55e51..16af27ae30 100644 --- a/src/simdag/sd_daxloader.c +++ b/src/simdag/sd_daxloader.c @@ -8,6 +8,7 @@ #include "simgrid/simdag.h" #include "xbt/misc.h" #include "xbt/log.h" +#include "xbt/file.h" /* xbt_basename() */ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_daxparse, sd, "Parsing DAX files"); @@ -367,7 +368,8 @@ xbt_dynar_t SD_daxload(const char *filename) } if (!acyclic_graph_detail(result)){ - XBT_ERROR("The DAX described in %s is not a DAG. It contains a cycle.", filename); + XBT_ERROR("The DAX described in %s is not a DAG. It contains a cycle.", + xbt_basename(filename)); xbt_dynar_foreach(result, cpt, file) SD_task_destroy(file); xbt_dynar_free_container(&result);