You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2014/12/12 01:45:24 UTC
ambari git commit: AMBARI-7679. Add psutil based resource monitoring
to collect host metrics. Unitests.py python version. (swagle)
Repository: ambari
Updated Branches:
refs/heads/trunk 4c0ac95e8 -> 8235e7d63
AMBARI-7679. Add psutil based resource monitoring to collect host metrics. Unitests.py python version. (swagle)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8235e7d6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8235e7d6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8235e7d6
Branch: refs/heads/trunk
Commit: 8235e7d63fbb0fb4f30ba209e3ac7f95bf3bf76f
Parents: 4c0ac95
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Thu Dec 11 16:37:08 2014 -0800
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Thu Dec 11 16:45:15 2014 -0800
----------------------------------------------------------------------
.../src/test/python/unitTests.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/8235e7d6/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py b/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py
index 73798cb..3469de1 100644
--- a/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py
+++ b/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -39,7 +41,10 @@ def get_parent_path(base, directory_name):
base = os.path.dirname(base)
if base == "/":
return None
- done = True if os.path.split(base)[-1] == directory_name else False
+ if os.path.split(base)[-1] == directory_name:
+ done = True
+ else:
+ done = False
return base
def get_test_files(path, mask = None, recursive=True):