aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Boudnik <cos@apache.org>2016-01-14 18:03:40 -0800
committerKonstantin Boudnik <cos@apache.org>2016-01-14 18:03:40 -0800
commit894fb8bcf03a4f39b74c372db1b161de8b110a55 (patch)
tree8a91810676fb10e9475fa14394c5126beca63b18
parente0a288d551d78f4cef38e877f14c3ee5ea4463cd (diff)
downloadbigtop-odpi-894fb8bcf03a4f39b74c372db1b161de8b110a55.tar.gz
BIGTOP-2243. :itest-common:test is broken without JAVA_HOME being set
-rw-r--r--bigtop-test-framework/src/test/groovy/org/apache/bigtop/itest/JarContentTest.groovy2
-rw-r--r--build.gradle4
2 files changed, 5 insertions, 1 deletions
diff --git a/bigtop-test-framework/src/test/groovy/org/apache/bigtop/itest/JarContentTest.groovy b/bigtop-test-framework/src/test/groovy/org/apache/bigtop/itest/JarContentTest.groovy
index b583d8af..9543b462 100644
--- a/bigtop-test-framework/src/test/groovy/org/apache/bigtop/itest/JarContentTest.groovy
+++ b/bigtop-test-framework/src/test/groovy/org/apache/bigtop/itest/JarContentTest.groovy
@@ -45,7 +45,7 @@ class JarContentTest {
@Test
void testUnpackJarContainer() {
- def destination = 'target/local.unpack.dir';
+ def destination = System.properties['buildDir'] ?: 'target/local.unpack.dir';
JarContent.unpackJarContainer('java.lang.String', destination, 'visitor');
// expect to find a number of sun/reflect/generics/visitor
// under destination folder
diff --git a/build.gradle b/build.gradle
index e7cd6633..5064cb5c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -167,6 +167,10 @@ project(':itest-common') {
artifacts.archives packageITest
+ test.doFirst {
+ if (System.getenv('JAVA_HOME') == null)
+ throw new GradleException("JAVA_HOME is required to test ${project.name}")
+ }
test {
exclude '**/Dummy*'
}