cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gir...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 6b70a6d
Date Mon, 09 Dec 2013 14:17:05 GMT
Updated Branches:
  refs/heads/4.3 6b5402bbf -> 391395f14
  refs/heads/master 5cbda8b64 -> 6b70a6db9


CLOUDSTACK-5413: Fixed bug CLOUDSTACK-5413


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6b70a6db
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6b70a6db
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6b70a6db

Branch: refs/heads/master
Commit: 6b70a6db94c5c2459acd8946c7ff0600ccb3b55d
Parents: 5cbda8b
Author: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Authored: Mon Dec 9 19:45:22 2013 +0530
Committer: Girish Shilamkar <girish@clogeny.com>
Committed: Mon Dec 9 19:45:22 2013 +0530

----------------------------------------------------------------------
 setup/dev/advancedsg.cfg             | 14 ++++----------
 setup/dev/basic.cfg                  | 10 ++--------
 tools/devcloud/devcloud.cfg          | 12 +++---------
 tools/marvin/marvin/codes.py         |  2 +-
 tools/marvin/marvin/config/setup.cfg | 10 ++--------
 tools/marvin/marvin/marvinInit.py    |  2 +-
 tools/marvin/marvin/marvinLog.py     |  9 +++++----
 tools/marvin/marvin/marvinPlugin.py  | 11 +++++++++--
 8 files changed, 27 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b70a6db/setup/dev/advancedsg.cfg
----------------------------------------------------------------------
diff --git a/setup/dev/advancedsg.cfg b/setup/dev/advancedsg.cfg
index c6a1f59..01f7fcc 100644
--- a/setup/dev/advancedsg.cfg
+++ b/setup/dev/advancedsg.cfg
@@ -106,17 +106,11 @@
         "db": "cloud", 
         "port": 3306, 
         "user": "cloud"
-    }, 
-    "logger": [
+    },
+    "logger": 
         {
-            "name": "TestClient", 
-            "file": "testclient.log"
-        }, 
-        {
-            "name": "TestCase", 
-            "file": "testcase.log"
-        }
-    ], 
+            "LogFolderPath": "/tmp/"
+        },
     "globalConfig": [
         {
             "name": "storage.cleanup.interval", 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b70a6db/setup/dev/basic.cfg
----------------------------------------------------------------------
diff --git a/setup/dev/basic.cfg b/setup/dev/basic.cfg
index e91c87a..3e39d6d 100644
--- a/setup/dev/basic.cfg
+++ b/setup/dev/basic.cfg
@@ -103,16 +103,10 @@
         "port": 3306,
         "user": "cloud"
     },
-    "logger": [
+    "logger": 
         {
-            "name": "TestClient",
-            "file": "/tmp/testclient.log"
+            "LogFolderPath": "/tmp/"
         },
-        {
-            "name": "TestCase",
-            "file": "/tmp/testcase.log"
-        }
-    ],
     "globalConfig": [
         {
             "name": "storage.cleanup.interval",

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b70a6db/tools/devcloud/devcloud.cfg
----------------------------------------------------------------------
diff --git a/tools/devcloud/devcloud.cfg b/tools/devcloud/devcloud.cfg
index e209b55..5232e3a 100644
--- a/tools/devcloud/devcloud.cfg
+++ b/tools/devcloud/devcloud.cfg
@@ -91,16 +91,10 @@
             ]
          }
     ], 
-    "logger": [
+    "logger": 
         {
-            "name": "TestClient", 
-            "file": "/tmp/testclient.log"
-        }, 
-        {
-            "name": "TestCase", 
-            "file": "/tmp/testcase.log"
-        }
-    ], 
+            "LogFolderPath": "/tmp/"
+        },
     "mgtSvr": [
         {
             "mgtSvrIp": "127.0.0.1", 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b70a6db/tools/marvin/marvin/codes.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/codes.py b/tools/marvin/marvin/codes.py
index 8f0f88d..74fb05d 100644
--- a/tools/marvin/marvin/codes.py
+++ b/tools/marvin/marvin/codes.py
@@ -46,4 +46,4 @@ NO = "no"
 YES = "yes"
 FAILED = "FAILED"
 UNKNOWN_ERROR = "Unknown Error"
-EXCEPTION = "Exception"
+EXCEPTION = "EXCEPTION"

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b70a6db/tools/marvin/marvin/config/setup.cfg
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/config/setup.cfg b/tools/marvin/marvin/config/setup.cfg
index 216314f..23981f0 100644
--- a/tools/marvin/marvin/config/setup.cfg
+++ b/tools/marvin/marvin/config/setup.cfg
@@ -137,16 +137,10 @@
         "port": 3306,
         "user": "cloud"
     },
-    "logger": [
+    "logger": 
         {
-            "name": "TestClient",
-            "file": "/tmp/testclient.log"
+            "LogFolderPath": "/tmp/"
         },
-        {
-            "name": "TestCase",
-            "file": "/tmp/testcase.log"
-        }
-    ],
     "globalConfig": [
         {
             "name": "network.gc.wait",

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b70a6db/tools/marvin/marvin/marvinInit.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/marvinInit.py b/tools/marvin/marvin/marvinInit.py
index d822a2b..17ee9bd 100644
--- a/tools/marvin/marvin/marvinInit.py
+++ b/tools/marvin/marvin/marvinInit.py
@@ -129,7 +129,7 @@ class MarvinInit:
                                                           "exceptions.txt"
             tc_run_log = self.logFolderPath + "/runinfo.txt"
             self.__tcRunDebugFile = open(self.logFolderPath +
-                                         "/tcresults.txt", "w")
+                                         "/results.txt", "w")
 
             log_obj = MarvinLog("CSLog")
             self.__tcRunLogger = log_obj.setLogHandler(tc_run_log)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b70a6db/tools/marvin/marvin/marvinLog.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/marvinLog.py b/tools/marvin/marvin/marvinLog.py
index ca4d600..76de185 100644
--- a/tools/marvin/marvin/marvinLog.py
+++ b/tools/marvin/marvin/marvinLog.py
@@ -19,6 +19,7 @@
 '''
 import logging
 import sys
+import time
 from marvin.codes import (NO,
                           YES
                           )
@@ -29,7 +30,7 @@ class MarvinLog:
     @Desc  : provides interface for logging to marvin
     @Input : logger_name : name for logger
     '''
-    logFormat = "%(asctime)s - %(levelname)s - %(name)s - %(message)s"
+    logFormat = logging.Formatter("%(asctime)s - %(levelname)s - %(name)s - %(message)s")
     _instance = None
 
     def __new__(cls, logger_name):
@@ -49,7 +50,7 @@ class MarvinLog:
     def setLogHandler(self, log_file_path, log_format=None,
                       log_level=logging.DEBUG):
         '''
-        @Desc:
+        @Desc: Adds the given Log handler to the current logger
         @Input: log_file_path: Log File Path as where to store the logs
                log_format : Format of log messages to be dumped
                log_level : Determines the level of logging for this logger
@@ -60,10 +61,10 @@ class MarvinLog:
             else:
                 stream = logging.StreamHandler(stream=sys.stdout)
 
-            if log_format is None:
+            if log_format is not None:
                 stream.setFormatter(log_format)
             else:
-                stream.setFormatter(cls.logFormat)
+                stream.setFormatter(self.__class__.logFormat)
             stream.setLevel(log_level)
             self.logger.addHandler(stream)
         except Exception, e:

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b70a6db/tools/marvin/marvin/marvinPlugin.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py
index f5b7a88..540ede9 100644
--- a/tools/marvin/marvin/marvinPlugin.py
+++ b/tools/marvin/marvin/marvinPlugin.py
@@ -48,6 +48,7 @@ class MarvinPlugin(Plugin):
         self.conf = None
         self.debugStream = sys.stdout
         self.testRunner = None
+        self.testResult = SUCCESS
         self.startTime = None
         self.testName = None
         self.tcRunLogger = None
@@ -122,7 +123,10 @@ class MarvinPlugin(Plugin):
     def startTest(self, test):
         """
         Currently used to record start time for tests
+        Dump Start Msg of TestCase to Log
         """
+        self.tcRunLogger.debug("::::::::::::STARTED : TC: " +
+                               str(self.testName) + " :::::::::::")
         self.startTime = time.time()
 
     def getErrorInfo(self, err):
@@ -141,6 +145,7 @@ class MarvinPlugin(Plugin):
         err_msg = self.getErrorInfo(err)
         self.tcRunLogger.fatal("%s: %s: %s" %
                                (EXCEPTION, self.testName, err_msg))
+        self.testResult = EXCEPTION
 
     def handleFailure(self, test, err):
         '''
@@ -149,6 +154,7 @@ class MarvinPlugin(Plugin):
         err_msg = self.getErrorInfo(err)
         self.tcRunLogger.fatal("%s: %s: %s" %
                                (FAILED, self.testName, err_msg))
+        self.testResult = FAILED
 
     def startMarvin(self):
         '''
@@ -186,10 +192,11 @@ class MarvinPlugin(Plugin):
             totTime = int(endTime - self.startTime)
             self.tcRunLogger.debug("TestCaseName: %s; Time Taken: "
                                    "%s Seconds; "
-                                   "StartTime: %s; EndTime: %s"
+                                   "StartTime: %s; EndTime: %s; Result: %s"
                                    % (self.testName, str(totTime),
                                       str(time.ctime(self.startTime)),
-                                      str(time.ctime(endTime))))
+                                      str(time.ctime(endTime)),
+                                      self.testResult))
 
     def _injectClients(self, test):
         setattr(test, "debug", self.tcRunLogger.debug)


Mime
View raw message