git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6597
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
p Testing the bypassing of the flexml parser
p Testing the bypassing of the flexml parser
-$ $SG_TEST_EXENV masterslave/masterslave_bypass
-> [0.000000] surf/surfxml_parse.c:447: [surf_parse/WARNING] Bypassing the XML parser since surf_parse_open received a NULL pointer. If it is not what you want, go fix your code.
+$ $SG_TEST_EXENV masterslave/masterslave_bypass --log=no_loc
+> [0.000000] [surf_parse/WARNING] Bypassing the XML parser since surf_parse_open received a NULL pointer. If it is not what you want, go fix your code.
> [host A:master:(1) 0.000000] [msg_test/INFO] Got 1 slave(s) :
> [host A:master:(1) 0.000000] [msg_test/INFO] host B
> [host A:master:(1) 0.000000] [msg_test/INFO] Got 20 task to process :
> [host A:master:(1) 0.000000] [msg_test/INFO] Got 1 slave(s) :
> [host A:master:(1) 0.000000] [msg_test/INFO] host B
> [host A:master:(1) 0.000000] [msg_test/INFO] Got 20 task to process :
p Testing a simple master/slave example application handling failures
p Testing a simple master/slave example application handling failures
-$ masterslave/masterslave_failure$EXEEXT ${srcdir:=.}/small_platform_with_failures.xml ${srcdir:=.}/masterslave/deployment_masterslave.xml --cfg:path=${srcdir}
-> [0.000000] simix/smx_process.c:100: [simix_process/WARNING] Cannot launch process 'slave' on failed host 'Fafard'
+$ masterslave/masterslave_failure$EXEEXT --log=no_loc ${srcdir:=.}/small_platform_with_failures.xml ${srcdir:=.}/masterslave/deployment_masterslave.xml --cfg:path=${srcdir}
+> [0.000000] [simix_process/WARNING] Cannot launch process 'slave' on failed host 'Fafard'
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 5 slave(s) :
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Jupiter
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Fafard
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 5 slave(s) :
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Jupiter
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Fafard
#include "xbt/dynar.h"
XBT_PUBLIC_DATA(int) (*xbt_pid) ();
#include "xbt/dynar.h"
XBT_PUBLIC_DATA(int) (*xbt_pid) ();
+int xbt_log_no_loc = 0; /* if set to true (with --log=no_loc), file localization will be omitted (for tesh tests) */
/** \addtogroup XBT_log
*
/** \addtogroup XBT_log
*
return;
DEBUG1("Parse log settings '%s'", control_string);
return;
DEBUG1("Parse log settings '%s'", control_string);
+ /* Special handling of no_loc request, which asks for any file localization to be omitted (for tesh runs) */
+ if (!strcmp(control_string,"no_loc")) {
+ xbt_log_no_loc=1;
+ return;
+ }
/* some initialization if this is the first time that this get called */
if (xbt_log_settings == NULL)
xbt_log_settings = xbt_dynar_new(sizeof(xbt_log_setting_t),
/* some initialization if this is the first time that this get called */
if (xbt_log_settings == NULL)
xbt_log_settings = xbt_dynar_new(sizeof(xbt_log_setting_t),
#include "portable.h"
extern const char *xbt_log_priority_names[7];
#include "portable.h"
extern const char *xbt_log_priority_names[7];
+extern int xbt_log_no_loc;
static double begin_of_time = -1;
static double begin_of_time = -1;
p +=
snprintf(p, 256 - (p - loc_buff), "%f] ",
gras_os_time() - begin_of_time);
p +=
snprintf(p, 256 - (p - loc_buff), "%f] ",
gras_os_time() - begin_of_time);
- if (ev->priority != xbt_log_priority_info)
+ if (ev->priority != xbt_log_priority_info && xbt_log_no_loc==0)
p +=
snprintf(p, 256 - (p - loc_buff), "%s:%d: ", ev->fileName,
ev->lineNum);
p +=
snprintf(p, 256 - (p - loc_buff), "%s:%d: ", ev->fileName,
ev->lineNum);
check_overflow;
/* Display file position if not INFO */
check_overflow;
/* Display file position if not INFO */
- if (ev->priority != xbt_log_priority_info)
+ if (ev->priority != xbt_log_priority_info && !xbt_log_no_loc)
p +=
snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "%s:%d: ",
ev->fileName, ev->lineNum);
p +=
snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "%s:%d: ",
ev->fileName, ev->lineNum);