You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2016/02/21 13:17:17 UTC
[1/2] groovy git commit: add travis ci file
Repository: groovy
Updated Branches:
refs/heads/GROOVY_2_4_X d154ade9e -> 2e57ac103
add travis ci file
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/f4fa2cea
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/f4fa2cea
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/f4fa2cea
Branch: refs/heads/GROOVY_2_4_X
Commit: f4fa2cea3893a3ff2dd71689fb0e97b66cf17dcc
Parents: d154ade
Author: pascalschumacher <pa...@gmx.net>
Authored: Sun Feb 21 13:16:31 2016 +0100
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Feb 21 13:16:31 2016 +0100
----------------------------------------------------------------------
.travis.yml | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/f4fa2cea/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..c085b1f
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+language: groovy
+
+jdk:
+ - openjdk6
+ - oraclejdk7
+
+install: true
+
+script: travis_wait ./gradlew test
+
+before_cache:
+ - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
+cache:
+ directories:
+ - $HOME/.gradle/caches/
+ - $HOME/.gradle/wrapper/
[2/2] groovy git commit: Skip CircularLanguageReferenceTest and
PropertyUsageFromJavaTest when running on Travis with JDK 6,
because these tests always fail with "java.lang.IllegalArgumentException: URI
is not hierarchical" on there.
Posted by pa...@apache.org.
Skip CircularLanguageReferenceTest and PropertyUsageFromJavaTest when running on Travis with JDK 6, because these tests always fail with "java.lang.IllegalArgumentException: URI is not hierarchical" on there.
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/2e57ac10
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/2e57ac10
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/2e57ac10
Branch: refs/heads/GROOVY_2_4_X
Commit: 2e57ac10388ac6ab1538973adf5f2aa8cb9854a6
Parents: f4fa2ce
Author: pascalschumacher <pa...@gmx.net>
Authored: Mon Feb 15 23:15:50 2016 +0100
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sun Feb 21 13:16:55 2016 +0100
----------------------------------------------------------------------
.../CircularLanguageReferenceTest.groovy | 33 ++++++++++++++++++++
.../PropertyUsageFromJavaTest.groovy | 33 ++++++++++++++++++++
2 files changed, 66 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/2e57ac10/src/test/org/codehaus/groovy/tools/stubgenerator/CircularLanguageReferenceTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/tools/stubgenerator/CircularLanguageReferenceTest.groovy b/src/test/org/codehaus/groovy/tools/stubgenerator/CircularLanguageReferenceTest.groovy
index 4450bed..1035cbd 100644
--- a/src/test/org/codehaus/groovy/tools/stubgenerator/CircularLanguageReferenceTest.groovy
+++ b/src/test/org/codehaus/groovy/tools/stubgenerator/CircularLanguageReferenceTest.groovy
@@ -18,6 +18,12 @@
*/
package org.codehaus.groovy.tools.stubgenerator
+import org.junit.After
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.JUnit4
+
/**
* Test circular reference between Java and Groovy, as well as inheritance:
* a Shape Java interface is implemented by a Rectangle Groovy class,
@@ -27,8 +33,30 @@ package org.codehaus.groovy.tools.stubgenerator
*
* @author Guillaume Laforge
*/
+import static org.junit.Assume.assumeFalse
+
+@RunWith(JUnit4)
class CircularLanguageReferenceTest extends StubTestCase {
+ @Before
+ void setUp() {
+ assumeNotOnTravisCIAndNotJava6()
+ super.setUp()
+ }
+
+ private assumeNotOnTravisCIAndNotJava6() {
+ boolean travisCI = new File('.').absolutePath =~ /travis/
+ boolean java6 = System.getProperty('java.version').startsWith('1.6')
+
+ assumeFalse('''Test always fails with "java.lang.IllegalArgumentException: URI is not hierarchical"
+ on open jdk used by travis.''', travisCI && java6)
+ }
+
+ @Test
+ void test() {
+ super.testRun()
+ }
+
void verifyStubs() {
classes['stubgenerator.circularLanguageReference.Rectangle'].with {
assert methods['area' ].signature == "public double area()"
@@ -39,5 +67,10 @@ class CircularLanguageReferenceTest extends StubTestCase {
assert imports == ['java.lang.*', 'java.io.*', 'java.net.*', 'java.util.*', 'groovy.lang.*', 'groovy.util.*']
}
}
+
+ @After
+ void tearDown() {
+ super.tearDown()
+ }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/2e57ac10/src/test/org/codehaus/groovy/tools/stubgenerator/PropertyUsageFromJavaTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/tools/stubgenerator/PropertyUsageFromJavaTest.groovy b/src/test/org/codehaus/groovy/tools/stubgenerator/PropertyUsageFromJavaTest.groovy
index eb34176..e199972 100644
--- a/src/test/org/codehaus/groovy/tools/stubgenerator/PropertyUsageFromJavaTest.groovy
+++ b/src/test/org/codehaus/groovy/tools/stubgenerator/PropertyUsageFromJavaTest.groovy
@@ -18,13 +18,41 @@
*/
package org.codehaus.groovy.tools.stubgenerator
+import org.junit.After
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.JUnit4
+
+import static org.junit.Assume.assumeFalse
+
/**
* Tests Groovy properties and how they can be used from Java.
*
* @author Guillaume Laforge
*/
+@RunWith(JUnit4)
class PropertyUsageFromJavaTest extends StubTestCase {
+ @Before
+ void setUp() {
+ assumeNotOnTravisCIAndNotJava6()
+ super.setUp()
+ }
+
+ private assumeNotOnTravisCIAndNotJava6() {
+ boolean travisCI = new File('.').absolutePath =~ /travis/
+ boolean java6 = System.getProperty('java.version').startsWith('1.6')
+
+ assumeFalse('''Test always fails with "java.lang.IllegalArgumentException: URI is not hierarchical"
+ on open jdk used by travis.''', travisCI && java6)
+ }
+
+ @Test
+ void test() {
+ super.testRun()
+ }
+
void verifyStubs() {
classes['stubgenerator.propertyUsageFromJava.somepackage.GroovyPogo'].with {
assert methods['getAge'].signature == "public int getAge()"
@@ -33,5 +61,10 @@ class PropertyUsageFromJavaTest extends StubTestCase {
assert methods['setName'].signature == "public void setName(java.lang.String value)"
}
}
+
+ @After
+ void tearDown() {
+ super.tearDown()
+ }
}