File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
test/jdk/java/lang/System Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2015 SAP SE. All rights reserved.
2+ * Copyright (c) 2015, 2021, SAP SE. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2424import jdk .test .lib .Platform ;
2525import jdk .test .lib .process .OutputAnalyzer ;
2626import jdk .test .lib .process .ProcessTools ;
27+ import jtreg .SkippedException ;
2728
2829/*
2930 * @test
@@ -49,8 +50,14 @@ public static void main(String args[]) throws Throwable {
4950 }
5051 else if (Platform .isOSX ()) {
5152 OutputAnalyzer output = ProcessTools .executeProcess ("sw_vers" , "-productVersion" );
52- if (!osVersion .equals (output .getOutput ().trim ())) {
53- throw new Error (osVersion + " != " + output .getOutput ().trim ());
53+ String swVersOutput = output .getOutput ().trim ();
54+ if (!osVersion .equals (swVersOutput )) {
55+ // This section can be removed if minimum build SDK is xcode 12+
56+ if (swVersOutput .startsWith (osVersion )) {
57+ throw new SkippedException ("MacOS version only matches in parts, this is expected when " +
58+ "JDK was built with Xcode < 12 and MacOS version patch is > 0" );
59+ }
60+ throw new Error (osVersion + " != " + swVersOutput );
5461 }
5562 }
5663 else if (Platform .isAix ()) {
You can’t perform that action at this time.
0 commit comments