summaryrefslogtreecommitdiffstats
path: root/tests/main.py
diff options
context:
space:
mode:
authordongwenjuan <dong.wenjuan@zte.com.cn>2017-07-21 15:20:54 +0800
committerdongwenjuan <dong.wenjuan@zte.com.cn>2017-07-26 17:31:12 +0800
commitcbb58ee4050a201c0125b0b0b1a7c8f162925849 (patch)
tree5a62df7b74a761719004e50880cfd35e0291a8a5 /tests/main.py
parent41fc677e7f6349d28ec938fe6ac9ff03e99894f1 (diff)
fix some bugs for python verify jobs:
1.PYTHON_ENABLE=True does not work in bash The python jobs does not run even we enabled them. The reason is that currently JJB parse the parameter 'PYTHON_ENABLE' as 'True' which does not work in bash. Fix it to compare with [Tt]rue. 2.Install tox if it is not installed 3.support only python3.4 in tox.ini 4.install python3-dev Change-Id: I1a8ebad2fd06fe50ca4f739adb8d6d76caa2963b Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'tests/main.py')
-rw-r--r--tests/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/main.py b/tests/main.py
index 45683d1e..1cd2b1d2 100644
--- a/tests/main.py
+++ b/tests/main.py
@@ -76,7 +76,7 @@ class DoctorTest(object):
def main():
"""doctor main"""
- doctor_root_dir = os.path.dirname(os.getcwd())
+ doctor_root_dir = os.path.dirname(sys.path[0])
config_file_dir = '{0}/{1}'.format(doctor_root_dir, 'etc/')
config_files = [join(config_file_dir, f) for f in os.listdir(config_file_dir)
if isfile(join(config_file_dir, f))]