From 786dcff24a479b6c3ad44806b369954137c61f08 Mon Sep 17 00:00:00 2001 From: mquinson Date: Thu, 26 Apr 2007 11:47:51 +0000 Subject: [PATCH] Test several settings from the binary itself instead of expecting me to pass those args on the cmd line git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3459 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- testsuite/xbt/log_usage.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/testsuite/xbt/log_usage.c b/testsuite/xbt/log_usage.c index 180dd4e5da..3c15144dad 100644 --- a/testsuite/xbt/log_usage.c +++ b/testsuite/xbt/log_usage.c @@ -22,13 +22,22 @@ XBT_LOG_NEW_CATEGORY(top,"Useless test channel"); #pragma argsused #endif -int main(int argc, char **argv) { - xbt_init(&argc,argv); - +static void dolog(const char *settings) { + INFO1("Test with the settings '%s'",settings); + xbt_log_control_set(settings); DEBUG1("val=%d", 1); WARN1("val=%d", 2); CDEBUG2(top, "val=%d%s", 3, "!"); - CRITICAL6("false alarm%s%s%s%s%s%s", "","","","","","!"); + CRITICAL6("false alarm%s%s%s%s%s%s", "","","","","","!"); +} + + +int main(int argc, char **argv) { + xbt_init(&argc,argv); + + dolog(""); + dolog("test.thres:debug"); + dolog("test.thres:critical"); xbt_exit(); return 0; -- 2.20.1