File tree Expand file tree Collapse file tree 1 file changed +25
-5
lines changed
tests/system/src/test/java/test/robot/test3d Expand file tree Collapse file tree 1 file changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -68,17 +68,37 @@ public class PointLightIlluminationTest extends VisualTestBase {
6868 private static final double COLOR_TOLERANCE = 0.07 ;
6969 private static volatile Scene testScene = null ;
7070
71- // Used to skip failing tests until JDK-8318985 is fixed
71+ // Used to skip failing tests on macOS 14 or later on aarch64 until JDK-8318985 is fixed
7272 private boolean isMacAarch64MacOS14 ;
7373
74+ private static int getFirstInt (String input ) {
75+ String str = input ;
76+ if (str == null ) {
77+ return -1 ;
78+ }
79+ str = str .trim ();
80+ if (str .isEmpty () || !Character .isDigit (str .charAt (0 ))) {
81+ return -1 ;
82+ }
83+ str = str .split ("\\ D+" )[0 ];
84+ return Integer .parseInt (str );
85+ }
86+
7487 @ BeforeEach
7588 public void setupEach () {
7689 assumeTrue (Platform .isSupported (ConditionalFeature .SCENE3D ));
90+
7791 // JDK-8318985
78- isMacAarch64MacOS14 = PlatformUtil .isMac () &&
79- "aarch64" .equals (System .getProperty ("os.arch" )) &&
80- System .getProperty ("os.version" ) != null &&
81- System .getProperty ("os.version" ).startsWith ("14" );
92+ isMacAarch64MacOS14 = false ;
93+ if (PlatformUtil .isMac () &&
94+ "aarch64" .equals (System .getProperty ("os.arch" ))) {
95+
96+ int majorVer = getFirstInt (System .getProperty ("os.version" ));
97+ if (majorVer >= 14 ) {
98+ isMacAarch64MacOS14 = true ;
99+ }
100+ }
101+
82102 // Use the same test scene for all tests
83103 if (testScene == null ) {
84104 runAndWait (() -> {
You can’t perform that action at this time.
0 commit comments