Browse Source

Update for gold files, minor fix for log module.

avkonst 12 years ago
parent
commit
8fe1fceeaf

+ 1 - 1
mainline/core/log.py

@@ -31,7 +31,7 @@ class Plugin(core.api.Plugin, core.api.IConfigurable):
         parser.add_option("--general.log-level", default=default_value_cur, choices=allowed_values,
         parser.add_option("--general.log-level", default=default_value_cur, choices=allowed_values,
                          help="Defines log level. Possible values are 'DEBUG','INFO','WARNING' or 'ERROR'. "
                          help="Defines log level. Possible values are 'DEBUG','INFO','WARNING' or 'ERROR'. "
                          "Default value is inherited from environment variable 'METRIXPLUSPLUS_LOG_LEVEL' if set. "
                          "Default value is inherited from environment variable 'METRIXPLUSPLUS_LOG_LEVEL' if set. "
-                         "Otherwise, it is '" + default_value_cur +  "' [default: %default]")
+                         "[default: " + default_value + "]")
     
     
     def configure(self, options):
     def configure(self, options):
         if options.__dict__['general.log_level'] == 'ERROR':
         if options.__dict__['general.log_level'] == 'ERROR':

+ 1 - 2
mainline/tests/general/test_basic/test_help_collect_default_stdout.gold.txt

@@ -28,8 +28,7 @@ Options:
                         Defines log level. Possible values are
                         Defines log level. Possible values are
                         'DEBUG','INFO','WARNING' or 'ERROR'. Default value is
                         'DEBUG','INFO','WARNING' or 'ERROR'. Default value is
                         inherited from environment variable
                         inherited from environment variable
-                        'METRIXPLUSPLUS_LOG_LEVEL' if set. Otherwise, it is
-                        'ERROR' [default: ERROR]
+                        'METRIXPLUSPLUS_LOG_LEVEL' if set. [default: INFO]
   --std.code.complexity.on
   --std.code.complexity.on
                         Enables collection of complexity metrics: cyclomatic
                         Enables collection of complexity metrics: cyclomatic
                         by McCabe [default: False]
                         by McCabe [default: False]

+ 1 - 2
mainline/tests/general/test_basic/test_help_export_default_stdout.gold.txt

@@ -6,8 +6,7 @@ Options:
                         Defines log level. Possible values are
                         Defines log level. Possible values are
                         'DEBUG','INFO','WARNING' or 'ERROR'. Default value is
                         'DEBUG','INFO','WARNING' or 'ERROR'. Default value is
                         inherited from environment variable
                         inherited from environment variable
-                        'METRIXPLUSPLUS_LOG_LEVEL' if set. Otherwise, it is
-                        'ERROR' [default: ERROR]
+                        'METRIXPLUSPLUS_LOG_LEVEL' if set. [default: INFO]
   --general.db-file=GENERAL.DB_FILE
   --general.db-file=GENERAL.DB_FILE
                         Primary database file to write (by the collector) and
                         Primary database file to write (by the collector) and
                         post-process (by other tools) [default: ./metrixpp.db]
                         post-process (by other tools) [default: ./metrixpp.db]

+ 1 - 2
mainline/tests/general/test_basic/test_help_info_default_stdout.gold.txt

@@ -6,8 +6,7 @@ Options:
                         Defines log level. Possible values are
                         Defines log level. Possible values are
                         'DEBUG','INFO','WARNING' or 'ERROR'. Default value is
                         'DEBUG','INFO','WARNING' or 'ERROR'. Default value is
                         inherited from environment variable
                         inherited from environment variable
-                        'METRIXPLUSPLUS_LOG_LEVEL' if set. Otherwise, it is
-                        'ERROR' [default: ERROR]
+                        'METRIXPLUSPLUS_LOG_LEVEL' if set. [default: INFO]
   --general.db-file=GENERAL.DB_FILE
   --general.db-file=GENERAL.DB_FILE
                         Primary database file to write (by the collector) and
                         Primary database file to write (by the collector) and
                         post-process (by other tools) [default: ./metrixpp.db]
                         post-process (by other tools) [default: ./metrixpp.db]

+ 1 - 2
mainline/tests/general/test_basic/test_help_limit_default_stdout.gold.txt

@@ -6,8 +6,7 @@ Options:
                         Defines log level. Possible values are
                         Defines log level. Possible values are
                         'DEBUG','INFO','WARNING' or 'ERROR'. Default value is
                         'DEBUG','INFO','WARNING' or 'ERROR'. Default value is
                         inherited from environment variable
                         inherited from environment variable
-                        'METRIXPLUSPLUS_LOG_LEVEL' if set. Otherwise, it is
-                        'ERROR' [default: ERROR]
+                        'METRIXPLUSPLUS_LOG_LEVEL' if set. [default: INFO]
   --general.db-file=GENERAL.DB_FILE
   --general.db-file=GENERAL.DB_FILE
                         Primary database file to write (by the collector) and
                         Primary database file to write (by the collector) and
                         post-process (by other tools) [default: ./metrixpp.db]
                         post-process (by other tools) [default: ./metrixpp.db]

+ 1 - 1
mainline/tests/general/test_basic/test_workflow_collect_default_stderr.gold.txt

@@ -2,4 +2,4 @@
 [LOG]: INFO:	Excluding: ./.unused.cpp
 [LOG]: INFO:	Excluding: ./.unused.cpp
 [LOG]: INFO:	Skipping: ./dummy.txt
 [LOG]: INFO:	Skipping: ./dummy.txt
 [LOG]: INFO:	Processing: ./simple.cpp
 [LOG]: INFO:	Processing: ./simple.cpp
-[LOG]: WARNING:	Exit code: 0. Time spent: 0.12 seconds. Done
+[LOG]: WARNING:	Exit code: 0. Time spent: 0.11 seconds. Done

+ 1 - 1
mainline/tests/general/test_basic/test_workflow_collect_second_stderr.gold.txt

@@ -2,4 +2,4 @@
 [LOG]: INFO:	Excluding: ./.unused.cpp
 [LOG]: INFO:	Excluding: ./.unused.cpp
 [LOG]: INFO:	Processing: ./simple.cpp
 [LOG]: INFO:	Processing: ./simple.cpp
 [LOG]: INFO:	Processing: ./simple2.cpp
 [LOG]: INFO:	Processing: ./simple2.cpp
-[LOG]: WARNING:	Exit code: 0. Time spent: 0.04 seconds. Done
+[LOG]: WARNING:	Exit code: 0. Time spent: 0.05 seconds. Done

+ 1 - 1
mainline/tests/general/test_basic/test_workflow_export_default_stderr.gold.txt

@@ -1,3 +1,3 @@
 [LOG]: WARNING:	Logging enabled with INFO level
 [LOG]: WARNING:	Logging enabled with INFO level
 [LOG]: INFO:	Processing: 
 [LOG]: INFO:	Processing: 
-[LOG]: WARNING:	Exit code: 0. Time spent: 0.0 seconds. Done
+[LOG]: WARNING:	Exit code: 0. Time spent: 0.01 seconds. Done

+ 6 - 2
mainline/tests/general/test_basic/test_workflow_info_default_stdout.gold.txt

@@ -1,8 +1,12 @@
-Info data:
+Properties:
 	version	=>	1.0
 	version	=>	1.0
 	core.log:version	=>	1.0
 	core.log:version	=>	1.0
-	std.code.complexity:version	=>	1.0
+	std.code.complexity:version	=>	1.1
 	std.code.cpp:version	=>	1.1
 	std.code.cpp:version	=>	1.1
 	std.code.cpp:files	=>	*.c,*.cc,*.cpp,*.cxx,*.h,*.hh,*.hpp,*.hxx
 	std.code.cpp:files	=>	*.c,*.cc,*.cpp,*.cxx,*.h,*.hh,*.hpp,*.hxx
 	std.code.cs:version	=>	1.0
 	std.code.cs:version	=>	1.0
 	std.code.cs:files	=>	*.cs
 	std.code.cs:files	=>	*.cs
+Namespaces:
+	std.code.complexity
+		- cyclomatic
+	general

+ 6 - 2
mainline/tests/general/test_basic/test_workflow_info_second_stdout.gold.txt

@@ -1,8 +1,12 @@
-Info data:
+Properties:
 	version	=>	1.0
 	version	=>	1.0
 	core.log:version	=>	1.0
 	core.log:version	=>	1.0
-	std.code.complexity:version	=>	1.0
+	std.code.complexity:version	=>	1.1
 	std.code.cpp:version	=>	1.1
 	std.code.cpp:version	=>	1.1
 	std.code.cpp:files	=>	*.c,*.cc,*.cpp,*.cxx,*.h,*.hh,*.hpp,*.hxx
 	std.code.cpp:files	=>	*.c,*.cc,*.cpp,*.cxx,*.h,*.hh,*.hpp,*.hxx
 	std.code.cs:version	=>	1.0
 	std.code.cs:version	=>	1.0
 	std.code.cs:files	=>	*.cs
 	std.code.cs:files	=>	*.cs
+Namespaces:
+	std.code.complexity
+		- cyclomatic
+	general

+ 1 - 1
mainline/tests/general/test_basic/test_workflow_limit_default_stderr.gold.txt

@@ -1,4 +1,4 @@
 [LOG]: WARNING:	Logging enabled with INFO level
 [LOG]: WARNING:	Logging enabled with INFO level
 [LOG]: INFO:	Processing: 
 [LOG]: INFO:	Processing: 
 [LOG]: INFO:	Applying limit: namespace 'std.code.complexity', filter '('cyclomatic', '>', 0.0)'
 [LOG]: INFO:	Applying limit: namespace 'std.code.complexity', filter '('cyclomatic', '>', 0.0)'
-[LOG]: WARNING:	Exit code: 4. Time spent: 0.0 seconds. Done
+[LOG]: WARNING:	Exit code: 4. Time spent: 0.01 seconds. Done