update the envs process for core test
authorliuct <liuchengtao1982@gmail.com>
Wed, 20 Aug 2014 18:24:09 +0000 (02:24 +0800)
committerliuct <liuchengtao1982@gmail.com>
Wed, 20 Aug 2014 18:24:09 +0000 (02:24 +0800)
packaging/testkit-lite.dsc
testkit-lite
testkitlite/util/session.py

index c211158..34a7ae1 100644 (file)
@@ -5,7 +5,7 @@ Maintainer: Lei Yang <lei.a.yang@intel.com>
 Build-Depends: debhelper (>= 8.0.0), python-setuptools, python-support (>= 0.8.4)
 Standards-Version: 3.9.2
 Homepage: https://github.com/testkit/testkit-manager
-Version: 3.1.5
+Version: 3.1.6
 Files:
444265e06d000f365253610735a5efb8 1398069 testkit-lite_3.1.5.tar.gz
819e67088599f4e74c938a02ade1d565 1398091 testkit-lite_3.1.6.tar.gz
 
index afc5b0b..0f8ab3d 100755 (executable)
@@ -306,6 +306,16 @@ to resolve this issue" % (LOG_DIR)
             webdriver_vars = initCapability()
         os.environ['WEBDRIVER_VARS'] = json.dumps(webdriver_vars)
 
+    # process test environ
+    if OPTIONS.test_env:
+        envs = OPTIONS.test_env.replace(';',' ').split(' ')
+        for env_t in envs:
+            env_t = env_t.strip()
+            if not env_t:
+                continue
+            k, v = env_t.split('=')
+            os.environ[k.strip()] = v.strip()
+
     # load test defintion files
     if "device:" in OPTIONS.testxml[0]:
         if not CONNECTOR.is_support_remote():
index 75ca8a2..cfe5148 100644 (file)
@@ -98,7 +98,6 @@ class TestSession:
         self.has_capability = False
         self.rerun = False
         self.test_prefix = ""
-        self.test_env = ""
         self.filter_ok = False
         self.wdurl = ""
         self.debugip =  ""
@@ -124,8 +123,6 @@ class TestSession:
             self.rerun = options.rerun
         if options.test_prefix:
             self.test_prefix = options.test_prefix
-        if options.test_env:
-            self.test_env = options.test_env
         if options.worker:
             self.worker_name = options.worker
         if options.targetplatform:
@@ -673,8 +670,6 @@ class TestSession:
                         if not tc_entry:
                             tc_entry = ""
                         case_detail_tmp["entry"] = self.test_prefix + tc_entry
-                        if self.test_env != "" and not tc_entry.endswith('html') and not tc_entry.endswith('htm'):
-                            case_detail_tmp["entry"] = self.test_env + " " + case_detail_tmp["entry"]
                         if tcase.find(
                                 'description/test_script_entry').get('timeout'):
                             case_detail_tmp["timeout"] = tcase.find(