You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2012/12/05 19:33:16 UTC
svn commit: r1417578 - in /incubator/flex/falcon/trunk:
compiler.tests/build.xml
compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNodeBaseTests.java
compiler/build.xml compiler/src/org/apache/flex/compiler/ant/FlexTask.java
Author: aharui
Date: Wed Dec 5 18:33:15 2012
New Revision: 1417578
URL: http://svn.apache.org/viewvc?rev=1417578&view=rev
Log:
Fix more issues caused by not copying the SDK any more. All tests pass on Mac OSX.
Modified:
incubator/flex/falcon/trunk/compiler.tests/build.xml
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNodeBaseTests.java
incubator/flex/falcon/trunk/compiler/build.xml
incubator/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/ant/FlexTask.java
Modified: incubator/flex/falcon/trunk/compiler.tests/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/build.xml?rev=1417578&r1=1417577&r2=1417578&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/build.xml (original)
+++ incubator/flex/falcon/trunk/compiler.tests/build.xml Wed Dec 5 18:33:15 2012
@@ -26,8 +26,10 @@
</pathconvert>
<property name="compiler" value="${compiler.tests}/../compiler"/>
- <property environment="env"/>
+ <property environment="env"/>
+ <property name="sdk" value="${env.FLEX_HOME}" />
<property name="sdk" value="${compiler}/generated/dist/sdk"/>
+ <property name="falcon" value="${compiler}/generated/dist/sdk"/>
<target name="download" description="Downloads third-party JARs">
<ant antfile="${compiler.tests}/downloads.xml" dir="${compiler.tests}"/>
@@ -39,16 +41,17 @@
</target>
<target name="jar.tests">
- <java jar="${sdk}/lib/falcon-mxmlc.jar" fork="true"/>
- <java jar="${sdk}/lib/falcon-compc.jar" fork="true"/>
- <java jar="${sdk}/lib/falcon-asc.jar" fork="true"/>
- <java jar="${sdk}/lib/falcon-optimizer.jar" fork="true"/>
- <java jar="${sdk}/lib/falcon-swfdump.jar" fork="true"/>
+ <java jar="${falcon}/lib/falcon-mxmlc.jar" fork="true"/>
+ <java jar="${falcon}/lib/falcon-compc.jar" fork="true"/>
+ <java jar="${falcon}/lib/falcon-asc.jar" fork="true"/>
+ <java jar="${falcon}/lib/falcon-optimizer.jar" fork="true"/>
+ <java jar="${falcon}/lib/falcon-swfdump.jar" fork="true"/>
</target>
<target name="ant.tests">
<property name="FLEX_HOME" value="${sdk}"/>
- <taskdef resource="flexTasks.tasks" classpath="${sdk}/lib/flexTasks.jar"/>
+ <property name="FALCON_HOME" value="${falcon}"/>
+ <taskdef resource="flexTasks.tasks" classpath="${falcon}/lib/falcon-flexTasks.jar"/>
<mxmlc file="${compiler.tests}/Hello.as"/>
<delete file="${compiler.tests}/Hello.swf"/>
<compc output="Hello.swc" include-classes="Hello">
@@ -65,7 +68,7 @@
<classpath>
<fileset dir="${compiler}/lib" includes="**/*.jar"/>
<fileset dir="${compiler.tests}/lib" includes="**/*.jar"/>
- <pathelement location="${sdk}/lib/compiler.jar"/>
+ <pathelement location="${falcon}/lib/compiler.jar"/>
</classpath>
</javac>
</target>
@@ -78,11 +81,12 @@
printsummary="true" showoutput="true"
haltonerror="false" haltonfailure="false"
failureproperty="tests.unit.failed">
+ <sysproperty key="FLEX_HOME" value="${sdk}" />
<classpath>
<pathelement location="${compiler.tests}/classes"/>
<fileset dir="${compiler}/lib" includes="**/*.jar"/>
<fileset dir="${compiler.tests}/lib" includes="**/*.jar"/>
- <pathelement location="${sdk}/lib/compiler.jar"/>
+ <pathelement location="${falcon}/lib/compiler.jar"/>
</classpath>
<batchtest todir="${compiler.tests}/results">
<fileset dir="${compiler.tests}/classes">
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNodeBaseTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNodeBaseTests.java?rev=1417578&r1=1417577&r2=1417578&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNodeBaseTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNodeBaseTests.java Wed Dec 5 18:33:15 2012
@@ -46,7 +46,10 @@ import org.junit.Test;
*/
public class MXMLNodeBaseTests
{
- private static final String SDK = FilenameNormalization.normalize("../compiler/generated/dist/sdk");
+ private static final String SDK = System.getProperty("FLEX_HOME") == null ?
+ FilenameNormalization.normalize("../compiler/generated/dist/sdk") :
+ System.getProperty("FLEX_HOME");
+
protected static Workspace workspace = new Workspace();
Modified: incubator/flex/falcon/trunk/compiler/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler/build.xml?rev=1417578&r1=1417577&r2=1417578&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler/build.xml (original)
+++ incubator/flex/falcon/trunk/compiler/build.xml Wed Dec 5 18:33:15 2012
@@ -733,6 +733,7 @@
<attribute name="Implementation-Title" value="${manifest.Implementation-Title} - ant Tasks"/>
<attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
<attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+ <attribute name="Class-Path" value="compiler.jar"/>
</manifest>
<fileset dir="${compiler}" includes="flexTasks.tasks"/>
<fileset dir="${compiler}/generated/classes" includes="${compiler.ant.binaries}"/>
Modified: incubator/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/ant/FlexTask.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/ant/FlexTask.java?rev=1417578&r1=1417577&r2=1417578&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/ant/FlexTask.java (original)
+++ incubator/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/ant/FlexTask.java Wed Dec 5 18:33:15 2012
@@ -236,9 +236,14 @@ public abstract class FlexTask extends J
if (flexHomeProperty == null)
throw new BuildException("FLEX_HOME must be set to use the Flex Ant Tasks");
-
+
+ String falconHomeProperty = getProject().getProperty("FALCON_HOME");
+ if (falconHomeProperty == null)
+ throw new BuildException("FALCON_HOME must be set to use the Flex Ant Tasks");
+
System.setProperty("FLEX_HOME", flexHomeProperty);
- System.setProperty("flexlib", flexHomeProperty.concat("/frameworks/"));
+ String flexlibProperty = flexHomeProperty.concat("/frameworks/");
+ System.setProperty("flexlib", flexlibProperty);
final Variable variable = new Variable();
variable.setKey("flexlib");
@@ -246,7 +251,7 @@ public abstract class FlexTask extends J
addSysproperty(variable);
// This allows the tool to find the default config file.
- cmdline.createArgument().setValue("+flexlib=" + flexHomeProperty + "/frameworks");
+ cmdline.createArgument().setValue("+flexlib=" + flexlibProperty);
prepareCommandline();
@@ -356,7 +361,7 @@ public abstract class FlexTask extends J
}
catch (ClassNotFoundException ignoredClassNotFoundException)
{
- String flexHomeProperty = getProject().getProperty("FLEX_HOME");
+ String flexHomeProperty = getProject().getProperty("FALCON_HOME");
if (flexHomeProperty != null)
{
@@ -397,13 +402,13 @@ public abstract class FlexTask extends J
}
else
{
- throw new BuildException("FLEX_HOME does not exist.", getLocation());
+ throw new BuildException("FALCON_HOME does not exist.", getLocation());
}
}
else
{
throw new BuildException("The class, " + className +
- ", must be in the classpath or the FLEX_HOME property must be set.",
+ ", must be in the classpath or the FALCON_HOME property must be set.",
getLocation());
}
}