8152897: refactor ToolBox to allow reduced documented dependencies

Reviewed-by: vromero
This commit is contained in:
Jonathan Gibbons 2016-03-31 15:20:50 -07:00
parent 208d93e110
commit 7812306bc0
212 changed files with 3955 additions and 3485 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -28,14 +28,17 @@
* @modules
* jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.jdeps/com.sun.tools.javap
* @build ToolBox ModuleTestBase
* @build toolbox.ToolBox toolbox.JavacTask ModuleTestBase
* @run main DoclintOtherModules
*/
import java.nio.file.Files;
import java.nio.file.Path;
import toolbox.JavacTask;
import toolbox.Task;
import toolbox.ToolBox;
public class DoclintOtherModules extends ModuleTestBase {
public static void main(String... args) throws Exception {
@ -57,13 +60,13 @@ public class DoclintOtherModules extends ModuleTestBase {
Path classes = base.resolve("classes");
Files.createDirectories(classes);
String log = tb.new JavacTask()
String log = new JavacTask(tb)
.options("-XDrawDiagnostics", "-modulesourcepath", src.toString(), "-Xlint:deprecation", "-Xdoclint:-reference", "-Werror")
.outdir(classes)
.files(findJavaFiles(m1))
.run(ToolBox.Expect.SUCCESS)
.run(Task.Expect.SUCCESS)
.writeAll()
.getOutput(ToolBox.OutputKind.DIRECT);
.getOutput(Task.OutputKind.DIRECT);
if (!log.isEmpty())
throw new Exception("expected output not found: " + log);