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:47 UTC

[04/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/8669b80f
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8669b80f
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8669b80f

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 8669b80f98da34da1b709d1ed4f14647cc1f952c
Parents: 198b1ab
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 13:20:29 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/8669b80f/test/system/auto/TestUtils.py
----------------------------------------------------------------------
diff --git a/test/system/auto/TestUtils.py b/test/system/auto/TestUtils.py
index 63a45b2..c7d1d83 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/8669b80f/test/system/auto/run.py
----------------------------------------------------------------------
diff --git a/test/system/auto/run.py b/test/system/auto/run.py
index 9db1f64..4475398 100755
--- a/test/system/auto/run.py
+++ b/test/system/auto/run.py
@@ -297,7 +297,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)