mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8220634: SymLinkArchiveTest should handle not being able to create symlinks
Reviewed-by: jjg
This commit is contained in:
parent
cd289e8386
commit
ab3f5e3e15
1 changed files with 8 additions and 1 deletions
|
@ -33,6 +33,7 @@
|
|||
* @run main SymLinkArchiveTest
|
||||
*/
|
||||
|
||||
import java.nio.file.FileSystemException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
@ -69,7 +70,13 @@ public class SymLinkArchiveTest extends TestRunner {
|
|||
tb.writeFile(javaFile, "class T extends p.B {}");
|
||||
|
||||
Path jar = base.resolve("lib.jar");
|
||||
Files.createSymbolicLink(jar, classpath.getFileName());
|
||||
try {
|
||||
Files.createSymbolicLink(jar, classpath.getFileName());
|
||||
} catch (FileSystemException fse) {
|
||||
System.err.println("warning: test passes vacuously, sym-link could not be created");
|
||||
System.err.println(fse.getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
Result result = new JavacTask(tb).files(javaFile).classpath(jar).run(Expect.FAIL);
|
||||
String output = result.getOutput(OutputKind.DIRECT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue