test framework: get rid of 'skip.community.tests' property in test classes

It's enough to have this property in test scripts, in tests we can just read exclude.tests.roots.file property.
This commit is contained in:
nik
2017-04-05 16:40:19 +03:00
parent 256c758e52
commit 915b22f2bf
2 changed files with 4 additions and 5 deletions
@@ -27,7 +27,6 @@ package com.intellij;
import com.intellij.idea.Bombed;
import com.intellij.idea.RecordExecution;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.VfsUtilCore;
import com.intellij.testFramework.*;
@@ -141,10 +140,11 @@ public class TestAll implements Test {
}
List<File> roots = ExternalClasspathClassLoader.getRoots();
if (roots != null) {
if (Comparing.equal(System.getProperty(TestCaseLoader.SKIP_COMMUNITY_TESTS), "true")) {
System.out.println("Skipping community tests");
List<File> excludeRoots = ExternalClasspathClassLoader.getExcludeRoots();
if (excludeRoots != null) {
System.out.println("Skipping tests from " + excludeRoots.size() + " roots");
roots = new ArrayList<>(roots);
roots.removeAll(new THashSet<>(ExternalClasspathClassLoader.getExcludeRoots(), FileUtil.FILE_HASHING_STRATEGY));
roots.removeAll(new THashSet<>(excludeRoots, FileUtil.FILE_HASHING_STRATEGY));
}
System.out.println("Collecting tests from roots specified by classpath.file property: " + roots);
@@ -50,7 +50,6 @@ public class TestCaseLoader {
public static final String PERFORMANCE_TESTS_ONLY_FLAG = "idea.performance.tests";
public static final String INCLUDE_PERFORMANCE_TESTS_FLAG = "idea.include.performance.tests";
public static final String INCLUDE_UNCONVENTIONALLY_NAMED_TESTS_FLAG = "idea.include.unconventionally.named.tests";
public static final String SKIP_COMMUNITY_TESTS = "idea.skip.community.tests";
/**
* An implicit group which includes all tests from all defined groups and tests which don't belong to any group.