blob: 4fe9694cf447c27487d4c4fd8efe46812d7cc38a [file] [log] [blame]
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.ether;
import org.jetbrains.jps.model.JpsModuleRootModificationUtil;
import org.jetbrains.jps.model.java.JpsJavaDependencyScope;
import org.jetbrains.jps.model.library.JpsLibrary;
import org.jetbrains.jps.model.module.JpsModule;
/**
* @author: db
* Date: 04.10.11
*/
public class MarkDirtyTest extends IncrementalTestCase {
public MarkDirtyTest() throws Exception {
super("markDirty");
}
public void testRecompileDependent() {
doTest();
}
public void testRecompileDependentTests() {
JpsModule module = addModule();
addTestRoot(module, "testSrc");
JpsLibrary library = addLibrary("lib/a.jar");
JpsModuleRootModificationUtil.addDependency(module, library, JpsJavaDependencyScope.TEST, false);
doTestBuild(1).assertSuccessful();
}
public void testTransitiveRecompile() {
JpsModule module = addModule();
addTestRoot(module, "testSrc");
JpsModule util = addModule("util", "util/src");
addTestRoot(util, "util/testSrc");
JpsModuleRootModificationUtil.addDependency(module, util);
JpsModule lib = addModule("lib", "lib/src");
addTestRoot(lib, "lib/testSrc");
JpsModuleRootModificationUtil.addDependency(util, lib);
doTestBuild(1).assertSuccessful();
}
public void testRecompileTwinDependencies() {
doTest().assertFailed();
}
}