summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2017-02-02 11:57:17 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2017-02-02 14:26:33 +0200
commitcfcbe7a0d5085af3d5fe1c9127b9237fa66408b2 (patch)
tree9ffa28bd77dc6e43aaed1ee2f93d48f2ffaf9bb8 /scripts/automation/regression
parent781d71db20b0c5acbe940eff1b1ef2f1b765ce54 (diff)
fixed missing .so files due to ignored by .gitignore + fixed path
Change-Id: If014548f3d007f9eda6d54332ac04952ea91f751 Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/automation/regression')
-rwxr-xr-xscripts/automation/regression/outer_packages.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/automation/regression/outer_packages.py b/scripts/automation/regression/outer_packages.py
index b2839dee..375a515e 100755
--- a/scripts/automation/regression/outer_packages.py
+++ b/scripts/automation/regression/outer_packages.py
@@ -26,14 +26,14 @@ NIGHTLY_MODULES = [ {'name': 'ansi2html'},
]
-def generate_module_path (module, is_python3, is_64bit, is_cel):
+def generate_module_path (module, is_python3, is_64bit, is_ucs2):
platform_path = [module['name']]
if module.get('py-dep'):
platform_path.append('python3' if is_python3 else 'python2')
if module.get('arch-dep'):
- platform_path.append('cel59' if is_cel else 'fedora18')
+ platform_path.append('ucs2' if is_ucs2 else 'ucs4')
platform_path.append('64bit' if is_64bit else '32bit')
return os.path.normcase(os.path.join(PATH_TO_PYTHON_LIB, *platform_path))
@@ -44,26 +44,26 @@ def import_module_list(modules_list):
# platform data
is_64bit = platform.architecture()[0] == '64bit'
is_python3 = (sys.version_info >= (3, 0))
- is_cel = os.path.exists('/etc/system-profile')
+ is_ucs2 = (sys.maxunicode == 65535)
# regular modules
for p in modules_list:
- full_path = generate_module_path(p, is_python3, is_64bit, is_cel)
+ full_path = generate_module_path(p, is_python3, is_64bit, is_ucs2)
if not os.path.exists(full_path):
print("Unable to find required module library: '{0}'".format(p['name']))
print("Please provide the correct path using PATH_TO_PYTHON_LIB variable")
print("current path used: '{0}'".format(full_path))
exit(0)
-
- sys.path.insert(1, full_path)
+ if full_path not in sys.path:
+ sys.path.insert(1, full_path)
def import_nightly_modules ():
- sys.path.append(TREX_PATH)
#sys.path.append(PATH_TO_CTRL_PLANE)
- sys.path.append(PATH_STL_API)
- sys.path.append(PATH_STF_API)
+ for path in (TREX_PATH, PATH_STL_API, PATH_STF_API):
+ if path not in sys.path:
+ sys.path.append(path)
import_module_list(NIGHTLY_MODULES)
#pprint.pprint(sys.path)