From: liuct Date: Wed, 20 Aug 2014 18:24:09 +0000 (+0800) Subject: update the envs process for core test X-Git-Tag: upstream/3.1.7~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bfbc170ff6056a38fcac80295ea5dcd999df21c4;p=test%2Ftools%2Ftestkit-lite.git update the envs process for core test --- diff --git a/packaging/testkit-lite.dsc b/packaging/testkit-lite.dsc index c211158..34a7ae1 100644 --- a/packaging/testkit-lite.dsc +++ b/packaging/testkit-lite.dsc @@ -5,7 +5,7 @@ Maintainer: Lei Yang 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 diff --git a/testkit-lite b/testkit-lite index afc5b0b..0f8ab3d 100755 --- a/testkit-lite +++ b/testkit-lite @@ -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(): diff --git a/testkitlite/util/session.py b/testkitlite/util/session.py index 75ca8a2..cfe5148 100644 --- a/testkitlite/util/session.py +++ b/testkitlite/util/session.py @@ -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(