equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
74 "Failed copying file from " + appJar + " to " + appJarUpper + ".", e); |
74 "Failed copying file from " + appJar + " to " + appJarUpper + ".", e); |
75 } |
75 } |
76 } else { |
76 } else { |
77 jarPathUpper = Paths.get(appJarUpper); |
77 jarPathUpper = Paths.get(appJarUpper); |
78 } |
78 } |
|
79 boolean isSameFile = Files.isSameFile(jarPath, jarPathUpper); |
79 |
80 |
80 out = TestCommon.exec(appJarUpper, "Hello", "-Xlog:class+path=info", |
81 TestCommon.run("-cp", appJarUpper, "Hello", "-Xlog:class+path=info", |
81 "-Xlog:cds"); |
82 "-Xlog:cds") |
82 if (TestCommon.isUnableToMap(out)) |
83 .ifNoMappingFailure(output -> { |
83 return; |
84 if (isSameFile) { |
84 |
85 output.shouldContain("Hello World"); |
85 if (Files.isSameFile(jarPath, jarPathUpper)) { |
86 } else { |
86 TestCommon.checkExec(out, "Hello World"); |
87 output.shouldContain("shared class paths mismatch"); |
87 } else { |
88 output.shouldHaveExitValue(1); |
88 out.shouldContain("shared class paths mismatch") |
89 } |
89 .shouldHaveExitValue(1); |
90 }); |
90 } |
91 } |
91 } |
|
92 } |
92 } |