From 0ee3fda94deff1461ac488d218a2af98057675c5 Mon Sep 17 00:00:00 2001 From: Dennis Camera Date: Wed, 11 Nov 2020 15:04:51 +0100 Subject: [PATCH] Fix paths to cdist executable --- cdist/integration.py | 5 ++--- cdist/test/__init__.py | 2 +- cdist/test/config/__init__.py | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cdist/integration.py b/cdist/integration.py index 03e4167d..17b65f09 100644 --- a/cdist/integration.py +++ b/cdist/integration.py @@ -54,13 +54,12 @@ _mydir = os.path.dirname(__file__) def find_cdist_exec(): """Search cdist executable starting from local lib directory. - Detect if ../scripts/cdist (from local lib direcotry) exists and + Detect if ../bin/cdist (from local lib directory) exists and if it is executable. If not then try to find cdist exec path in os.get_exec_path() entries. If no cdist path is found rasie cdist.Error. """ - cdist_path = os.path.abspath(os.path.join(_mydir, '..', 'scripts', - 'cdist')) + cdist_path = os.path.abspath(os.path.join(_mydir, '..', 'bin', 'cdist')) if os.access(cdist_path, os.X_OK): return cdist_path cdist_path = find_cdist_exec_in_path() diff --git a/cdist/test/__init__.py b/cdist/test/__init__.py index faa3686a..16a311e4 100644 --- a/cdist/test/__init__.py +++ b/cdist/test/__init__.py @@ -26,7 +26,7 @@ import tempfile cdist_base_path = os.path.abspath( os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../")) -cdist_exec_path = os.path.join(cdist_base_path, "scripts/cdist") +cdist_exec_path = os.path.join(cdist_base_path, "bin/cdist") global_fixtures_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "fixtures")) diff --git a/cdist/test/config/__init__.py b/cdist/test/config/__init__.py index 0ed614b1..c405207c 100644 --- a/cdist/test/config/__init__.py +++ b/cdist/test/config/__init__.py @@ -202,7 +202,7 @@ class ConfigRunTestCase(test.CdistTestCase): host_dir_name=self.hostdir, # exec_path can not derivated from sys.argv in case of unittest exec_path=os.path.abspath(os.path.join( - my_dir, '../../../scripts/cdist')), + my_dir, '../../../bin/cdist')), initial_manifest=os.path.join(fixtures, 'manifest/dryrun_manifest'), add_conf_dirs=[fixtures]) @@ -219,7 +219,7 @@ class ConfigRunTestCase(test.CdistTestCase): base_root_path=self.host_base_path, host_dir_name=self.hostdir, exec_path=os.path.abspath(os.path.join( - my_dir, '../../../scripts/cdist')), + my_dir, '../../../bin/cdist')), initial_manifest=os.path.join( fixtures, 'manifest/init-deps-resolver'), add_conf_dirs=[fixtures])