incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1370456 - in /incubator/easyant/plugins/trunk/compile-test-scala/src: main/resources/ test/ test/antunit/ test/antunit/src/ test/antunit/src/integration-test/ test/antunit/src/integration-test/scala/ test/antunit/src/integration-test/scala...
Date Tue, 07 Aug 2012 19:23:47 GMT
Author: jlboudart
Date: Tue Aug  7 19:23:46 2012
New Revision: 1370456

URL: http://svn.apache.org/viewvc?rev=1370456&view=rev
Log:
Add compile-test-scala test case

Added:
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/compile-test-scala-test.xml
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/sample-module.ivy
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/integration-test/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/integration-test/scala/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/integration-test/scala/org/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/integration-test/scala/org/apache/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/integration-test/scala/org/apache/easyant/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/integration-test/scala/org/apache/easyant/example/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/integration-test/scala/org/apache/easyant/example/Example2.scala
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/test/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/test/scala/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/test/scala/org/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/test/scala/org/apache/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/test/scala/org/apache/easyant/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/
    incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/Example.scala
Modified:
    incubator/easyant/plugins/trunk/compile-test-scala/src/main/resources/compile-test-scala.ant

Modified: incubator/easyant/plugins/trunk/compile-test-scala/src/main/resources/compile-test-scala.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/compile-test-scala/src/main/resources/compile-test-scala.ant?rev=1370456&r1=1370455&r2=1370456&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/compile-test-scala/src/main/resources/compile-test-scala.ant
(original)
+++ incubator/easyant/plugins/trunk/compile-test-scala/src/main/resources/compile-test-scala.ant
Tue Aug  7 19:23:46 2012
@@ -48,17 +48,17 @@
         <attribute name="prefix"/>
         <sequential>
             <mkdir dir="${target.@{prefix}.classes}" />
-            <scalac  srcdir="${src.@{prefix}.java}"
+            <scalac  srcdir="${src.@{prefix}.scala}"
                     destdir="${target.@{prefix}.classes}"
                     classpathref="compile.test.classpath"
                     includes="${@{prefix}.compile.includes.pattern}"
                     excludes="${@{prefix}.compile.excludes.pattern}"
-                    scalacdebugging="${javac.debug.mode}">
+                    scalacdebugging="${scalac.debug.mode}">
             </scalac>
         </sequential>
     </macrodef>
 
-    <target name="compile-test-scala:compile" depends="compile-test-scala:configure" if="has.src.test.java"
extensionOf="abstract-compile:compile-finished">
+    <target name="compile-test-scala:compile" depends="compile-test-scala:configure" if="has.src.test.scala"
extensionOf="abstract-compile:compile-finished">
         <ea:parameter property="test.compile.includes.pattern" default="**/*.scala" 
             description="Pattern describing files included in test compilation process" />
         <ea:parameter property="test.compile.excludes.pattern" default="" 
@@ -67,8 +67,8 @@
     	<compile-scala-tests prefix="test"/>
     </target>
 
-    <target name="compile-test-scala:compile-integration" depends="compile-test-scala:configure"
if="has.src.test.integration.java" extensionOf="abstract-compile:compile-finished">
-        <ea:parameter property="test.integration.compile.includes.pattern" default="**/*.groovy"

+    <target name="compile-test-scala:compile-integration" depends="compile-test-scala:configure"
if="has.src.test.integration.scala" extensionOf="abstract-compile:compile-finished">
+        <ea:parameter property="test.integration.compile.includes.pattern" default="**/*.scala"

             description="Pattern describing files included in integration test compilation
process" />
         <ea:parameter property="test.integration.compile.excludes.pattern" default=""

             description="Pattern describing files excluded in integration test compilation
process" />

Added: incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/compile-test-scala-test.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/compile-test-scala-test.xml?rev=1370456&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/compile-test-scala-test.xml
(added)
+++ incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/compile-test-scala-test.xml
Tue Aug  7 19:23:46 2012
@@ -0,0 +1,71 @@
+<!--
+   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.
+-->
+<project name="org.apache.easyant.plugins;compile-test.scala-test" 
+    xmlns:au="antlib:org.apache.ant.antunit" 
+    xmlns:ivy="antlib:org.apache.ivy.ant"
+    xmlns:ea="antlib:org.apache.easyant">
+    
+    <!-- Import your plugin --> 
+    <property name="target" value="target/test-antunit"/>
+    <!-- configure easyant in current project -->
+    <ea:configure-easyant-ivy-instance />
+    <!-- import our local plugin -->
+    <ea:import-test-module moduleIvy="../../../module.ivy" sourceDirectory="../../main/resources"/>
+
+    <!-- Defines a setUp / tearDown (before each test) that cleans the environnement -->

+    <target name="clean" description="remove stale build artifacts before / after each
test">
+        <delete dir="${basedir}" includeemptydirs="true">
+            <include name="**/target/**"/>
+            <include name="**/lib/**"/>
+        </delete>
+    </target>
+    
+    <target name="setUp" depends="clean">
+        <!--FIXME: findclasspath requires project.ivy.instance and a resolved module -->
+        <ivy:settings id="project.ivy.instance"/>
+        <ivy:resolve file="sample-module.ivy" settingsRef="project.ivy.instance"/>
+    </target>
+    <target name="tearDown" depends="clean"/>
+    
+    <target name="test-compile-test-scala">
+        <au:assertPropertyEquals name="src.test.scala" value="${basedir}/src/test/scala"/>
+        <au:assertPropertyEquals name="src.test.integration.scala" value="${basedir}/src/integration-test/scala"/>
+        <au:assertPropertyEquals name="has.src.test.scala" value="true"/>
+        <au:assertPropertyEquals name="has.src.test.integration.scala" value="true"/>
+    </target>
+    
+    <target name="test-compile-test-scala:configure" depends="compile-test-scala:configure">
+         <au:assertReferenceSet refid="resolved.scala.classpath"/>
+    </target>
+
+    <target name="test-compile-test-scala:compile" depends="compile-test-scala:compile">
+        <au:assertPropertyEquals name="test.compile.includes.pattern" value="**/*.scala"/>
+        <au:assertPropertyEquals name="test.compile.excludes.pattern" value=""/>
+
+        <au:assertFileExists file="${target.test.classes}"/>	
+        <au:assertFileExists file="${target.test.classes}/org/apache/easyant/example/Example.class"/>
+    </target>
+
+    <target name="test-compile-test-scala:compile-integration" depends="compile-test-scala:compile-integration">
+        <au:assertPropertyEquals name="test.integration.compile.includes.pattern" value="**/*.scala"/>
+        <au:assertPropertyEquals name="test.integration.compile.excludes.pattern" value=""/>
+
+        <au:assertFileExists file="${target.test.integration.classes}"/>	
+        <au:assertFileExists file="${target.test.integration.classes}/org/apache/easyant/example/Example2.class"/>
+    </target>
+
+</project>

Added: incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/sample-module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/sample-module.ivy?rev=1370456&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/sample-module.ivy
(added)
+++ incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/sample-module.ivy
Tue Aug  7 19:23:46 2012
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+<ivy-module version="2.0" xmlns:ea="http://www.easyant.org"> 
+    <info organisation="org.apache.easyant" module="standard-java-app" revision="0.1"
status="integration"/>
+    <configurations>
+        <conf name="default" description="runtime dependencies artifact can be used with
this conf"/>
+        <conf name="test" description="this scope indicates that the dependency is not
required for normal use of the application, and is only available for the test compilation
and execution phases."/>
+        <conf name="provided" description="this is much like compile, but indicates you
expect the JDK or a container to provide it. It is only available on the compilation classpath,
and is not transitive."/>
+    </configurations>
+    <dependencies>
+        <dependency org="junit" name="junit" rev="4.4" conf="*->default"/>
+    </dependencies>
+
+</ivy-module>

Added: incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/integration-test/scala/org/apache/easyant/example/Example2.scala
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/integration-test/scala/org/apache/easyant/example/Example2.scala?rev=1370456&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/integration-test/scala/org/apache/easyant/example/Example2.scala
(added)
+++ incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/integration-test/scala/org/apache/easyant/example/Example2.scala
Tue Aug  7 19:23:46 2012
@@ -0,0 +1,25 @@
+/*
+ *  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.
+ *
+ */
+package org.apache.easyant.example;
+
+object Example2 {
+    def main(args: Array[String]) {
+        println("Hello, world!");
+    }
+
+}

Added: incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/Example.scala
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/Example.scala?rev=1370456&view=auto
==============================================================================
--- incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/Example.scala
(added)
+++ incubator/easyant/plugins/trunk/compile-test-scala/src/test/antunit/src/test/scala/org/apache/easyant/example/Example.scala
Tue Aug  7 19:23:46 2012
@@ -0,0 +1,25 @@
+/*
+ *  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.
+ *
+ */
+package org.apache.easyant.example;
+
+object Example {
+    def main(args: Array[String]) {
+        println("Hello, world!");
+    }
+
+}



Mime
View raw message