incubator-groovy git commit: Revert "Apache license does not allow jars in the source, so let the test create the required jars out of base-64 encoded strings"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

incubator-groovy git commit: Revert "Apache license does not allow jars in the source, so let the test create the required jars out of base-64 encoded strings"

pascalschumacher
Repository: incubator-groovy
Updated Branches:
  refs/heads/master 1bb5c5a92 -> 0ef69feb8


Revert "Apache license does not allow jars in the source, so let the test create the required jars out of base-64 encoded strings"

This reverts commit 098c88ab38dc365a5a98cd61b8c169c2ace9c53f and 098c88ab38dc365a5a98cd61b8c169c2ace9c53f.


Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/0ef69feb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/0ef69feb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/0ef69feb

Branch: refs/heads/master
Commit: 0ef69feb88d09f67bf21a9ebc17407287de8f93d
Parents: 1bb5c5a
Author: pascalschumacher <[hidden email]>
Authored: Mon Jun 15 20:49:11 2015 +0200
Committer: pascalschumacher <[hidden email]>
Committed: Mon Jun 15 20:49:11 2015 +0200

----------------------------------------------------------------------
 .../1.0.7225-test/module-test-1.0.7225-test.jar | Bin 0 -> 2541 bytes
 .../1.2-test/module-test-1.2-test.jar           | Bin 0 -> 3326 bytes
 .../stc/STCExtensionMethodsTest.groovy          |  16 ++-
 .../m12n/ExtensionModuleHelperForTests.groovy   | 129 +------------------
 .../runtime/m12n/ExtensionModuleTest.groovy     |  50 +++----
 5 files changed, 39 insertions(+), 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/0ef69feb/src/test-resources/jars/module-test/module-test/1.0.7225-test/module-test-1.0.7225-test.jar
----------------------------------------------------------------------
diff --git a/src/test-resources/jars/module-test/module-test/1.0.7225-test/module-test-1.0.7225-test.jar b/src/test-resources/jars/module-test/module-test/1.0.7225-test/module-test-1.0.7225-test.jar
new file mode 100644
index 0000000..d08e03c
Binary files /dev/null and b/src/test-resources/jars/module-test/module-test/1.0.7225-test/module-test-1.0.7225-test.jar differ

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/0ef69feb/src/test-resources/jars/module-test/module-test/1.2-test/module-test-1.2-test.jar
----------------------------------------------------------------------
diff --git a/src/test-resources/jars/module-test/module-test/1.2-test/module-test-1.2-test.jar b/src/test-resources/jars/module-test/module-test/1.2-test/module-test-1.2-test.jar
new file mode 100644
index 0000000..2678d82
Binary files /dev/null and b/src/test-resources/jars/module-test/module-test/1.2-test/module-test-1.2-test.jar differ

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/0ef69feb/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy b/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
index 76d1597..b8260c8 100644
--- a/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
+++ b/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
@@ -37,9 +37,7 @@ class STCExtensionMethodsTest extends StaticTypeCheckingTestCase {
     }
 
     void testShouldFindExtensionMethodWithGrab() {
-        URL moduleTest12JarURL = ExtensionModuleHelperForTests.createModuleTest12Jar()
-
-        ExtensionModuleHelperForTests.doInFork('groovy.transform.stc.StaticTypeCheckingTestCase', """
+        ExtensionModuleHelperForTests.doInFork('groovy.transform.stc.StaticTypeCheckingTestCase', '''
         def impl = new MetaClassImpl(String)
         impl.initialize()
         String.metaClass = impl
@@ -47,9 +45,13 @@ class STCExtensionMethodsTest extends StaticTypeCheckingTestCase {
         // ensure that the module isn't loaded
         assert !registry.modules.any { it.name == 'Test module for Grab' && it.version == '1.2-test' }
 
-        def resolver = "@GrabResolver(name='local',root='$moduleTest12JarURL')"
+        // find jar resource
+        def jarURL = this.class.getResource("/jars")
+        assert jarURL
+
+        def resolver = "@GrabResolver(name='local',root='$jarURL')"
 
-        assertScript resolver + '''
+        assertScript resolver + """
         @Grab('module-test:module-test:1.2-test')
         import org.codehaus.groovy.runtime.m12n.*
 
@@ -58,8 +60,8 @@ class STCExtensionMethodsTest extends StaticTypeCheckingTestCase {
         assert str.reverseToUpperCase2() == str.toUpperCase().reverse()
         // a static method added to String thanks to a @Grab extension
         assert String.answer2() == 42
-        '''
-        """)
+        """
+        ''')
     }
 
     void testExtensionMethodWithGenericsAndPrimitiveReceiver() {

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/0ef69feb/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleHelperForTests.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleHelperForTests.groovy b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleHelperForTests.groovy
index 01fb34e..997fc50 100644
--- a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleHelperForTests.groovy
+++ b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleHelperForTests.groovy
@@ -19,138 +19,15 @@
 
 package org.codehaus.groovy.runtime.m12n
 
-public class ExtensionModuleHelperForTests {
-
-    // Apache License does not allow jars/binaries in the source
-    private static final String moduleTest12JarContentsBase64Encoded =
-'''UEsDBBQAAAAIALSK2UBQTDGungAAAEABAAA9ABwATUVUQS1JTkYvc2VydmljZXMvb3JnLmNvZGVo
-YXVzLmdyb292eS5ydW50aW1lLkV4dGVuc2lvbk1vZHVsZVVUCQADBILoTwSC6E91eAsAAQTpAwAA
-BOkDAACdjr8OgkAMh/d7ij6AHpGdyRAnXSTuJxS4CFfT9vzz9nJRGJyMU9P2931tlkHVe4HWDwhT
-jYINKIGiKGiPgA/FIJ4CjNTEKdSyG/FOfDHvwWFqiyrF5wAx7NidP/sTcsKLjc3XyWoW43ZwIigF
-cWdrarB3UWzHRLen5RjUj2jHTR5ssh+VfejKmc1XP1F7d10QI+rU1+Wf5xP7/Y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zL2dyb292eS9ydW50aW1lL1VUBQADBq6jT3V4CwABBOkDAAAE6QMAAFBLAQIeAwoAAAAA
-AOFipEAAAAAAAAAAAAAAAAAUABgAAAAAAAAAEAD9QVUCAABvcmcvY29kZWhhdXMvZ3Jvb3Z5L1VU
-BQADBq6jT3V4CwABBOkDAAAE6QMAAFBLAQIeAwoAAAAAAOFipEAAAAAAAAAAAAAAAAANABgAAAAA
-AAAAEAD9QaMCAABvcmcvY29kZWhhdXMvVVQFAAMGrqNPdXgLAAEE6QMAAATpAwAAUEsBAh4DCgAA
-AAAA4WKkQAAAAAAAAAAAAAAAAAQAGAAAAAAAAAAQAP1B6gIAAG9yZy9VVAUAAwauo091eAsAAQTp
-AwAABOkDAABQSwECHgMUAAAACADpYqRAiSnRV58BAAAAAwAAOwAYAAAAAAAAAAAAtIEoAwAAb3Jn
-L2NvZGVoYXVzL2dyb292eS9ydW50aW1lL20xMm4vVGVzdFN0cmluZ0V4dGVuc2lvbjIuY2xhc3NV
-VAUAAxWuo091eAsAAQTpAwAABOkDAABQSwECHgMUAAAACADsYqRAELcvmyMBAADqAQAAQQAYAAAA
-AAAAAAAAtIE8BQAAb3JnL2NvZGVoYXVzL2dyb292eS9ydW50aW1lL20xMm4vVGVzdFN0YXRpY1N0
-cmluZ0V4dGVuc2lvbjIuY2xhc3NVVAUAAxuuo091eAsAAQTpAwAABOkDAABQSwECHgMUAAAACAB9
-itlA1rQ64y4BAADQAQAANwAYAAAAAAAAAAAAtIHaBgAAb3JnL2NvZGVoYXVzL2dyb292eS9ydW50
-aW1lL20xMm4vVGVzdE1hcEV4dGVuc2lvbi5jbGFzc1VUBQADnoHoT3V4CwABBOkDAAAE6QMAAFBL
-BQYAAAAACwALAG8EAAB5CAAAAAA='''
-
-    private static final String moduleTest107225JarContentsBase64Encoded =
-'''UEsDBAoAAAgIAAp4nEUAAAAAAgAAAAAAAAAJAAAATUVUQS1JTkYvAwBQSwMECgAACAgACnicRbJ/
-Au4bAAAAGQAAABQA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oZjhBtAQAAbAIAADoAGAAAAAAAAAAAAKSBEgQAAG9yZy9jb2RlaGF1cy9n
-cm9vdnkvcnVudGltZS9tMTJuL0dyb292eTcyMjVFeHRlbnNpb24uY2xhc3NVVAUAA7ddoVR1eAsA
-AQToAwAABOgDAABQSwUGAAAAAAsACwDkAwAA8wUAAAAA'''
-
-    static URL createModuleTest12Jar(){
-        createTestJar('module-test-1.2-test', moduleTest12JarContentsBase64Encoded)
-    }
-
-    static URL createModuleTest107225Jar() {
-        createTestJar('module-test-1.0.7225-test', moduleTest107225JarContentsBase64Encoded)
-    }
-
-    private static URL createTestJar(String name, String base64Content) {
-        File tmpJar = File.createTempFile(name, 'jar')
-        tmpJar.deleteOnExit()
-        tmpJar << base64Content.decodeBase64()
-        tmpJar.toURI().toURL()
-    }
+import org.codehaus.groovy.tools.FileSystemCompiler;
 
+public class ExtensionModuleHelperForTests {
     static void doInFork(String code) {
         doInFork("GroovyTestCase", code)
     }
 
     static void doInFork(String baseTestClass, String code) {
-        File baseDir = File.createTempDir()
+        File baseDir = FileSystemCompiler.createTempDir()
         File source = new File(baseDir, 'Temp.groovy')
         source << """import org.codehaus.groovy.runtime.m12n.*
     class TempTest extends $baseTestClass {

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/0ef69feb/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
index 5497e29..61c315b 100644
--- a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
+++ b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
@@ -23,14 +23,6 @@ package org.codehaus.groovy.runtime.m12n
  */
 class ExtensionModuleTest extends GroovyTestCase {
 
-    private static final URL moduleTest12JarURL
-    private static final URL moduleTest107225JarURL
-
-    static {
-        moduleTest12JarURL = ExtensionModuleHelperForTests.createModuleTest12Jar()
-        moduleTest107225JarURL = ExtensionModuleHelperForTests.createModuleTest107225Jar()
-    }
-
     void testThatModuleHasBeenLoaded() {
         ExtensionModuleHelperForTests.doInFork '''
             ExtensionModuleRegistry registry = GroovySystem.metaClassRegistry.moduleRegistry
@@ -46,14 +38,18 @@ class ExtensionModuleTest extends GroovyTestCase {
     }
 
     void testThatModuleCanBeLoadedWithGrab() {
-        ExtensionModuleHelperForTests.doInFork """
+        ExtensionModuleHelperForTests.doInFork '''
             ExtensionModuleRegistry registry = GroovySystem.metaClassRegistry.moduleRegistry
             // ensure that the module isn't loaded
             assert !registry.modules.any { it.name == 'Test module for Grab' && it.version == '1.2-test' }
 
-            def resolver = "@GrabResolver('$moduleTest12JarURL')"
+            // find jar resource
+            def jarURL = this.class.getResource("/jars")
+            assert jarURL
+
+            def resolver = "@GrabResolver('$jarURL')"
 
-            assertScript resolver + '''
+            assertScript resolver + """
             @Grab(value='module-test:module-test:1.2-test', changing='true')
             import org.codehaus.groovy.runtime.m12n.*
 
@@ -65,49 +61,57 @@ class ExtensionModuleTest extends GroovyTestCase {
             def str = 'This is a string'
             assert str.reverseToUpperCase2() == str.toUpperCase().reverse()
             assert String.answer2() == 42
-            '''
+            """
 
             // the module should still be available
             assert registry.modules.any { it.name == 'Test module for Grab' && it.version == '1.2-test' }
-        """
+        '''
     }
 
     void testExtensionModuleUsingGrabAndMap() {
-        ExtensionModuleHelperForTests.doInFork """
+        ExtensionModuleHelperForTests.doInFork '''
             ExtensionModuleRegistry registry = GroovySystem.metaClassRegistry.moduleRegistry
             // ensure that the module isn't loaded
             assert !registry.modules.any { it.name == 'Test module for Grab' && it.version == '1.2-test' }
 
-            def resolver = "@GrabResolver('$moduleTest12JarURL')"
+            // find jar resource
+            def jarURL = this.class.getResource("/jars")
+            assert jarURL
+
+            def resolver = "@GrabResolver('$jarURL')"
 
-            assertScript resolver + '''
+            assertScript resolver + """
             @Grab(value='module-test:module-test:1.2-test', changing='true')
             import org.codehaus.groovy.runtime.m12n.*
 
             def map = [:]
             assert 'foo'.taille() == 3
             assert map.taille() == 0
-            '''
-        """
+            """
+        '''
     }
 
     /**
      * Test case that reproduces GROOVY-7225.
      */
     void testExtensionModuleUsingGrabAndClosure() {
-        ExtensionModuleHelperForTests.doInFork """
+        ExtensionModuleHelperForTests.doInFork '''
             ExtensionModuleRegistry registry = GroovySystem.metaClassRegistry.moduleRegistry
             // ensure that the module isn't loaded
             assert !registry.modules.any { it.name == 'Groovy Test 7225' && it.version == '1.0.7225-test' }
 
-            assertScript '''
-            @GrabResolver('$moduleTest107225JarURL')
+            // find jar resource
+            def jarURL = this.class.getResource("/jars")
+            assert jarURL
+
+            assertScript """
+            @GrabResolver('$jarURL')
             @Grab(value='module-test:module-test:1.0.7225-test', changing='true')
             import org.codehaus.groovy.runtime.m12n.*
 
             assert 'test'.groovy7225() == 'test: ok'
             assert {->}.groovy7225() == '{"field":"value"}'
-            '''
-        """
+            """
+        '''
     }
 }