Search in sources :

Example 1 with BuildLoggingManager

use of org.jetbrains.jps.builders.logging.BuildLoggingManager in project intellij-community by JetBrains.

the class IncrementalTestCase method doTestBuild.

protected BuildResult doTestBuild(int makesCount) {
    StringBuilder log = new StringBuilder();
    String rootPath = FileUtil.toSystemIndependentName(workDir.getAbsolutePath()) + "/";
    final ProjectDescriptor pd = createProjectDescriptor(new BuildLoggingManager(new StringProjectBuilderLogger(rootPath, log)));
    BuildResult result = null;
    try {
        doBuild(pd, CompileScopeTestBuilder.rebuild().allModules()).assertSuccessful();
        for (int idx = 0; idx < makesCount; idx++) {
            modify(idx);
            result = doBuild(pd, CompileScopeTestBuilder.make().allModules());
        }
        File logFile = new File(baseDir.getAbsolutePath() + ".log");
        if (!logFile.exists()) {
            logFile = new File(baseDir, "build.log");
        }
        assertSameLinesWithFile(logFile.getAbsolutePath(), log.toString());
    } finally {
        pd.release();
    }
    assertNotNull(result);
    if (result.isSuccessful()) {
        checkMappingsAreSameAfterRebuild(result);
    }
    return result;
}
Also used : BuildResult(org.jetbrains.jps.builders.BuildResult) ProjectDescriptor(org.jetbrains.jps.cmdline.ProjectDescriptor) BuildLoggingManager(org.jetbrains.jps.builders.logging.BuildLoggingManager) File(java.io.File)

Aggregations

File (java.io.File)1 BuildResult (org.jetbrains.jps.builders.BuildResult)1 BuildLoggingManager (org.jetbrains.jps.builders.logging.BuildLoggingManager)1 ProjectDescriptor (org.jetbrains.jps.cmdline.ProjectDescriptor)1