You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2026/02/04 22:19:35 UTC
(royale-compiler) 03/03: sdk.dependent.tests: fix for Linux
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 8bd5ca9feddcff783429d8a55be04448c2a957a0
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed Feb 4 13:34:23 2026 -0800
sdk.dependent.tests: fix for Linux
Tweaks to match how flex-sdk Ant build behaves
- skip automation SWCs
- use different config for mobilethheme on Linux
Bug:
- fix textLayout path for case-sensitive file system
---
compiler/src/test/java/f/SDKSWCTests.java | 89 ++++++++++++++++++++++++++++---
1 file changed, 82 insertions(+), 7 deletions(-)
diff --git a/compiler/src/test/java/f/SDKSWCTests.java b/compiler/src/test/java/f/SDKSWCTests.java
index 032cbd494..4f6b45340 100644
--- a/compiler/src/test/java/f/SDKSWCTests.java
+++ b/compiler/src/test/java/f/SDKSWCTests.java
@@ -31,6 +31,7 @@ import java.util.List;
import org.apache.royale.compiler.clients.COMPC;
import org.apache.royale.compiler.problems.ICompilerProblem;
import org.apache.royale.utils.EnvProperties;
+import org.junit.Before;
import org.junit.Test;
import com.google.common.collect.ObjectArrays;
@@ -50,8 +51,11 @@ public class SDKSWCTests
private static EnvProperties env = EnvProperties.initiate();
private static final String TEXTLAYOUT_NAME = "textLayout";
+ private static final String MOBILETHEME_NAME = "mobiletheme";
private String[] extraArgs = new String[]{};
+
+ private boolean isWindowsOrMac = true;
private void compileSWC(String projectName)
{
@@ -78,13 +82,17 @@ public class SDKSWCTests
}
String configFile;
- if (projectName.equals(TEXTLAYOUT_NAME))
+ if (projectName.equals(MOBILETHEME_NAME) && !isWindowsOrMac)
+ {
+ configFile = env.SDK + "/frameworks/projects/" + projectName + "/compile-configAIR2.xml";
+ }
+ else if (projectName.equals(TEXTLAYOUT_NAME))
{
- configFile = env.TLF + "/compile-config.xml";
+ configFile = env.TLF + "/compile-config.xml";
}
else
{
- configFile = env.SDK + "/frameworks/projects/" + projectName + "/compile-config.xml";
+ configFile = env.SDK + "/frameworks/projects/" + projectName + "/compile-config.xml";
}
String[] baseArgs = new String[]
@@ -109,6 +117,13 @@ public class SDKSWCTests
}
assertThat(problems.size(), is(0));
}
+
+ @Before
+ public void setUp()
+ {
+ String osName = System.getProperty("os.name").toLowerCase();
+ isWindowsOrMac = osName.contains("windows") || osName.contains("mac os");
+ }
@Test
public void advancedgridsSWC()
@@ -168,6 +183,12 @@ public class SDKSWCTests
@Test
public void automationSWC()
{
+ if (!isWindowsOrMac)
+ {
+ // this doesn't get built on Linux
+ return;
+ }
+
extraArgs = new String[]
{
"-ignore-problems+=org.apache.royale.compiler.problems.ThisUsedInClosureProblem",
@@ -178,6 +199,12 @@ public class SDKSWCTests
@Test
public void automation_agentSWC()
{
+ if (!isWindowsOrMac)
+ {
+ // this doesn't get built on Linux
+ return;
+ }
+
extraArgs = new String[]
{
"-ignore-problems+=org.apache.royale.compiler.problems.DuplicateQNameInSourcePathProblem",
@@ -190,7 +217,13 @@ public class SDKSWCTests
@Test
public void automation_airsparkSWC()
{
- extraArgs = new String[]
+ if (!isWindowsOrMac)
+ {
+ // this doesn't get built on Linux
+ return;
+ }
+
+ extraArgs = new String[]
{
"+env.AIR_HOME=" + env.AIRSDK,
"-ignore-problems+=org.apache.royale.compiler.problems.ThisUsedInClosureProblem",
@@ -202,7 +235,13 @@ public class SDKSWCTests
@Test
public void automation_airSWC()
{
- extraArgs = new String[]
+ if (!isWindowsOrMac)
+ {
+ // this doesn't get built on Linux
+ return;
+ }
+
+ extraArgs = new String[]
{
"+env.AIR_HOME=" + env.AIRSDK,
"-ignore-problems+=org.apache.royale.compiler.problems.DuplicateQNameInSourcePathProblem",
@@ -215,6 +254,12 @@ public class SDKSWCTests
@Test
public void automation_dmvSWC()
{
+ if (!isWindowsOrMac)
+ {
+ // this doesn't get built on Linux
+ return;
+ }
+
extraArgs = new String[]
{
"-ignore-problems+=org.apache.royale.compiler.problems.DuplicateQNameInSourcePathProblem",
@@ -227,7 +272,13 @@ public class SDKSWCTests
@Test
public void automation_flashflexkitSWC()
{
- extraArgs = new String[]
+ if (!isWindowsOrMac)
+ {
+ // this doesn't get built on Linux
+ return;
+ }
+
+ extraArgs = new String[]
{
"-ignore-problems+=org.apache.royale.compiler.problems.ThisUsedInClosureProblem",
};
@@ -237,6 +288,12 @@ public class SDKSWCTests
@Test
public void automation_sparkSWC()
{
+ if (!isWindowsOrMac)
+ {
+ // this doesn't get built on Linux
+ return;
+ }
+
extraArgs = new String[]
{
"-ignore-problems+=org.apache.royale.compiler.problems.ThisUsedInClosureProblem",
@@ -295,6 +352,12 @@ public class SDKSWCTests
@Test
public void flash_integrationSWC()
{
+ if (!isWindowsOrMac)
+ {
+ // this doesn't get built on Linux
+ return;
+ }
+
extraArgs = new String[]
{
"-ignore-problems+=org.apache.royale.compiler.problems.ThisUsedInClosureProblem",
@@ -419,7 +482,7 @@ public class SDKSWCTests
{
extraArgs = new String[]
{
- "+source.dir=./textlayout",
+ "+source.dir=./textLayout",
"-define=CONFIG::debug,false",
"-define=CONFIG::release,true",
"-ignore-problems+=org.apache.royale.compiler.problems.ThisUsedInClosureProblem",
@@ -431,6 +494,12 @@ public class SDKSWCTests
@Test
public void tool_airSWC()
{
+ if (!isWindowsOrMac)
+ {
+ // this doesn't get built on Linux
+ return;
+ }
+
extraArgs = new String[]
{
"+env.AIR_HOME=" + env.AIRSDK,
@@ -444,6 +513,12 @@ public class SDKSWCTests
@Test
public void toolSWC()
{
+ if (!isWindowsOrMac)
+ {
+ // this doesn't get built on Linux
+ return;
+ }
+
extraArgs = new String[]
{
"-ignore-problems+=org.apache.royale.compiler.problems.DuplicateQNameInSourcePathProblem",