Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Test several settings from the binary itself instead of expecting me to pass those...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 26 Apr 2007 11:47:51 +0000 (11:47 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 26 Apr 2007 11:47:51 +0000 (11:47 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3459 48e7efb5-ca39-0410-a469-dd3cf9ba447f

testsuite/xbt/log_usage.c

index 180dd4e..3c15144 100644 (file)
@@ -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;