ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [1/7] ambari git commit: AMBARI-14821: Unit tests doesn't export scripts from common-services folder into PYTHONPATH (nalex via jaoki)
Date Wed, 24 Feb 2016 14:24:16 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-dev-patch-upgrade a5b673dd1 -> db999ae82


AMBARI-14821: Unit tests doesn't export scripts from common-services folder into PYTHONPATH
(nalex via jaoki)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d0320567
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d0320567
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d0320567

Branch: refs/heads/branch-dev-patch-upgrade
Commit: d032056754246880a48939255784767bc31302e4
Parents: 083ac6d
Author: Jun Aoki <jaoki@apache.org>
Authored: Tue Feb 23 16:03:37 2016 -0800
Committer: Jun Aoki <jaoki@apache.org>
Committed: Tue Feb 23 16:03:37 2016 -0800

----------------------------------------------------------------------
 ambari-server/src/test/python/unitTests.py | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d0320567/ambari-server/src/test/python/unitTests.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/unitTests.py b/ambari-server/src/test/python/unitTests.py
index 6368ca1..b010804 100644
--- a/ambari-server/src/test/python/unitTests.py
+++ b/ambari-server/src/test/python/unitTests.py
@@ -108,6 +108,14 @@ def stack_test_executor(base_folder, service, stack, custom_tests, executor_resu
     if os.path.split(root)[-1] in ["scripts", "files"] and service in root:
       script_folders.add(root)
 
+  # Add the common-services scripts directories to the PATH
+  base_commserv_folder = os.path.join(server_src_dir, "main", "resources", "common-services")
+  for folder, subFolders, files in os.walk(os.path.join(base_commserv_folder, service)):
+    # folder will return the versions of the services
+    scripts_dir = os.path.join(folder, "package", "scripts")
+    if os.path.exists(scripts_dir):
+      script_folders.add(scripts_dir)
+
   sys.path.extend(script_folders)
 
   tests = get_test_files(base_folder, mask = test_mask)


Mime
View raw message