Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 6a04d3ce1 -> 053b82e7f


(Tests: Clarified some Gradle related issues)


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/053b82e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/053b82e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/053b82e7

Branch: refs/heads/3
Commit: 053b82e7fb4bf87889014bd95752100eddee10b0
Parents: 6a04d3c
Author: ddekany <[email protected]>
Authored: Wed May 17 20:45:38 2017 +0200
Committer: ddekany <[email protected]>
Committed: Wed May 17 20:45:38 2017 +0200

----------------------------------------------------------------------
 build.gradle                                      |  7 ++++---
 .../apache/freemarker/test/TemplateTestSuite.java | 18 +++++-------------
 2 files changed, 9 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/053b82e7/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 226d760..0f56664 100644
--- a/build.gradle
+++ b/build.gradle
@@ -106,16 +106,17 @@ subprojects {
     jar {
         manifest {   // org.gradle.api.plugins.osgi.OsgiManifest
             version versionForOSGi
-            license "Apache License, Version 2.0" // TODO has no effect; bug?
+            license "Apache License, Version 2.0" // Has no effect on Gradle 
3.5; see issues/2056 below
             vendor "Apache Software Foundation"
             // TODO The autogenerated Bundle-SymbolicName is weird, esp. for 
freemarker-core-java8. How should it look?
             
             attributes(
-                "Bundle-License": "Apache License, Version 2.0",  // because 
`license "..."` above didn't work
                 "Specification-Version": versionForMf,
                 "Specification-Vendor": "Apache Software Foundation",
                 "Implementation-Version": versionForMf,
-                "Implementation-Vendor": "Apache Software Foundation"
+                "Implementation-Vendor": "Apache Software Foundation",
+                // Remove when https://github//.com/gradle/gradle/issues/2056 
is fixed:
+                "Bundle-License": "Apache License, Version 2.0",
             )
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/053b82e7/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TemplateTestSuite.java
----------------------------------------------------------------------
diff --git 
a/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TemplateTestSuite.java
 
b/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TemplateTestSuite.java
index c9b4e4c..9e4e7f0 100644
--- 
a/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TemplateTestSuite.java
+++ 
b/freemarker-test-utils/src/main/java/org/apache/freemarker/test/TemplateTestSuite.java
@@ -37,7 +37,8 @@ import org.apache.freemarker.core.Template;
 import org.apache.freemarker.core.Version;
 import org.apache.freemarker.core.util._StringUtil;
 import org.apache.freemarker.dom.NodeModel;
-import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.AllTests;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -51,9 +52,8 @@ import junit.framework.TestSuite;
 /**
  * Abstract superclass for JUnit test suites where the test cases are defined 
in
  * {@code <suiteClassPackage>/testcases.xml}, and process templates and 
compare their output with the expected output.
- * It's important to add this static method like <code>public static TestSuite 
suite() { return new
- * SomeTemplateTestSuite(); }</code> to concrete subclasses, or else it won't 
be detected and run by build tools and
- * IDE-s.
+ * The concrete subclass must have a static method like <code>public static 
TestSuite suite() { return new
+ * SomeTemplateTestSuite(); }</code>!
  * <p>
  * If you only want to run certain tests, you can specify a regular expression 
for the test name in the
  * {@link #TEST_FILTER_PROPERTY_NAME} system property.
@@ -71,6 +71,7 @@ import junit.framework.TestSuite;
  * subclass.</li>
  * </ol>
  */
+@RunWith(AllTests.class)
 public abstract class TemplateTestSuite extends TestSuite {
     
     private static final String ELEM_TEST_CASE = "testCase";
@@ -142,15 +143,6 @@ public abstract class TemplateTestSuite extends TestSuite {
         }
     }
 
-    /**
-     * At least with Gradle 3.5 TestSuite-s aren't run even if we explicitly 
include the class, unless we have a
-     * test method in them (which won't be run).
-     */
-    @Test
-    public final void gradleTestPluginWorkaround() {
-        // Does nothing
-    }
-
     protected abstract void setUpTestCase(String simpleTestName, Map<String, 
Object> dataModel,
             Configuration.ExtendableBuilder<?> confB) throws Exception;
 

Reply via email to