You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by bh...@apache.org on 2014/01/06 20:09:59 UTC
[16/20] git commit: ACCUMULO-1944 Restore test runs when Cobertura
not installed
ACCUMULO-1944 Restore test runs when Cobertura not installed
The changes in the prior commit to re-enable test coverage assume that Cobertura
is available. When it isn't, functional test runs fail. This commit allows runs
to proceed when Cobertura is not installed.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c23126a8
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c23126a8
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c23126a8
Branch: refs/heads/1.6.0-SNAPSHOT
Commit: c23126a86d23566b154747d153bf489a09684c97
Parents: 950f144
Author: Bill Havanki <bh...@cloudera.com>
Authored: Thu Jan 2 10:15:05 2014 -0500
Committer: Bill Havanki <bh...@cloudera.com>
Committed: Mon Jan 6 14:06:17 2014 -0500
----------------------------------------------------------------------
test/system/auto/TestUtils.py | 2 ++
test/system/auto/run.py | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c23126a8/test/system/auto/TestUtils.py
----------------------------------------------------------------------
diff --git a/test/system/auto/TestUtils.py b/test/system/auto/TestUtils.py
index 5368f4e..eb3211d 100644
--- a/test/system/auto/TestUtils.py
+++ b/test/system/auto/TestUtils.py
@@ -52,6 +52,8 @@ SITE_PATH = os.path.join(ACCUMULO_CONF_DIR, SITE)
COBERTURA_HOME = os.path.join(ACCUMULO_HOME, 'lib', 'test', 'cobertura')
def findCoberturaJar():
+ if not os.path.exists(COBERTURA_HOME):
+ return None
jars = [f for f in os.listdir(COBERTURA_HOME) if re.search(r'cobertura.*\.jar', f)]
if len(jars) >= 1:
return jars[0]
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c23126a8/test/system/auto/run.py
----------------------------------------------------------------------
diff --git a/test/system/auto/run.py b/test/system/auto/run.py
index 2bda355..74704e4 100755
--- a/test/system/auto/run.py
+++ b/test/system/auto/run.py
@@ -298,7 +298,9 @@ def main():
map(suite.addTest, filtered)
if options.coverage:
- cobertura_jar = os.path.join(COBERTURA_HOME, findCoberturaJar())
+ cobertura_jar = findCoberturaJar()
+ if cobertura_jar:
+ cobertura_jar = os.path.join(COBERTURA_HOME, cobertura_jar)
if not cobertura_jar or not os.access(cobertura_jar, os.F_OK):
print "Install Cobertura under %s" % COBERTURA_HOME
sys.exit(1)