Examples of CloverOptimizedTestSet


Examples of com.atlassian.clover.ant.types.CloverOptimizedTestSet

            }
        }

        getLog().debug("Effective filtering: includes=" + includes + ", excludes=" + excludes);
       
        final CloverOptimizedTestSet testsToRun = new CloverOptimizedTestSet();
        testsToRun.setProject(antProj);
        testsToRun.setLogger(new MvnLogger(getLog()));
        testsToRun.setFullRunEvery(fullRunEvery);
        testsToRun.setDebug(debug);

        testsToRun.setSnapshotFile(new ConfigUtil(this).resolveSnapshotFile(snapshot));
        if (ordering != null) {
            final CloverOptimizedTestSet.TestOrdering order = new CloverOptimizedTestSet.TestOrdering();
            order.setValue(ordering);
            testsToRun.setOrdering(order);
        }
        testsToRun.setMinimize(minimize);
        testsToRun.setEnabled(enabled);

        antProj.setProperty(CloverNames.PROP_INITSTRING, resolveCloverDatabase());
        antProj.setName(getProject().getName());

        final List<String> testSources = getProject().getTestCompileSourceRoots();
        for (String testSource : testSources) {
            addTestRoot(antProj, includes, excludes, testsToRun, testSource);
        }
        return testsToRun.getOptimizedTestResource();
    }
View Full Code Here

Examples of com.atlassian.clover.types.CloverOptimizedTestSet

            }
        }

        getLog().debug("Effective filtering: includes=" + includes + ", excludes=" + excludes);
       
        final CloverOptimizedTestSet testsToRun = new CloverOptimizedTestSet();
        testsToRun.setProject(antProj);
        testsToRun.setLogger(new MvnLogger(getLog()));
        testsToRun.setFullRunEvery(fullRunEvery);
        testsToRun.setDebug(debug);

        testsToRun.setSnapshotFile(new ConfigUtil(this).resolveSnapshotFile(snapshot));
        if (ordering != null) {
            final CloverOptimizedTestSet.TestOrdering order = new CloverOptimizedTestSet.TestOrdering();
            order.setValue(ordering);
            testsToRun.setOrdering(order);
        }
        testsToRun.setMinimize(minimize);
        testsToRun.setEnabled(enabled);

        antProj.setProperty(CloverNames.PROP_INITSTRING, resolveCloverDatabase());
        antProj.setName(getProject().getName());

        final List testSources = getProject().getTestCompileSourceRoots();

        for (final Iterator iterator = testSources.iterator(); iterator.hasNext();) {
            addTestRoot(antProj, includes, excludes, testsToRun, (String) iterator.next());
        }
        return testsToRun.getOptimizedTestResource();
    }
View Full Code Here

Examples of com.atlassian.clover.types.CloverOptimizedTestSet

            }
        }

        getLog().debug("Effective filtering: includes=" + includes + ", excludes=" + excludes);
       
        final CloverOptimizedTestSet testsToRun = new CloverOptimizedTestSet();
        testsToRun.setProject(antProj);
        testsToRun.setLogger(new MvnLogger(getLog()));
        testsToRun.setFullRunEvery(fullRunEvery);
        testsToRun.setDebug(debug);

        testsToRun.setSnapshotFile(new ConfigUtil(this).resolveSnapshotFile(snapshot));
        if (ordering != null) {
            final CloverOptimizedTestSet.TestOrdering order = new CloverOptimizedTestSet.TestOrdering();
            order.setValue(ordering);
            testsToRun.setOrdering(order);
        }
        testsToRun.setMinimize(minimize);
        testsToRun.setEnabled(enabled);

        antProj.setProperty(CloverNames.PROP_INITSTRING, resolveCloverDatabase());
        antProj.setName(getProject().getName());

        final List<String> testSources = getProject().getTestCompileSourceRoots();
        for (String testSource : testSources) {
            addTestRoot(antProj, includes, excludes, testsToRun, testSource);
        }
        return testsToRun.getOptimizedTestResource();
    }
View Full Code Here

Examples of com.cenqua.clover.types.CloverOptimizedTestSet

        }

        final List includes = optimizeIncludes != null ? optimizeIncludes : (surefireIncludes != null) ? surefireIncludes : DEFAULT_INCLUDES;
        final List excludes = optimizeExcludes != null ? optimizeExcludes : surefireExcludes;

        final CloverOptimizedTestSet testsToRun = new CloverOptimizedTestSet();
        testsToRun.setProject(antProj);
        testsToRun.setLogger(new MvnLogger(getLog()));
        testsToRun.setFullRunEvery(fullRunEvery);
        testsToRun.setSnapshotFile(snapshot);
        if (ordering != null) {
            CloverOptimizedTestSet.TestOrdering order = new CloverOptimizedTestSet.TestOrdering();
            order.setValue(ordering);
            testsToRun.setOrdering(order);
        }
        testsToRun.setMinimize(minimize);
        testsToRun.setEnabled(enabled);

        antProj.setProperty(CloverNames.PROP_INITSTRING, resolveCloverDatabase());
        antProj.setName(getProject().getName());

        final List testSources = getProject().getTestCompileSourceRoots();

        for (Iterator iterator = testSources.iterator(); iterator.hasNext();) {
            String testRoot = (String) iterator.next();
            final File testRootDir = new File(testRoot);
            if (!testRootDir.exists()) {
                // if the test dir does not exist, do not add this as a fileset.
                continue;
            }

            FileSet testFileSet = new FileSet();
            testFileSet.setProject(antProj);

            testFileSet.setDir(testRootDir);


            testFileSet.appendIncludes((String[]) includes.toArray(new String[includes.size()]));
            getLog().debug("Appending includes: " + includes);

            if (excludes != null && excludes.size() > 0) {
                testFileSet.appendExcludes((String[]) excludes.toArray(new String[excludes.size()]));
                getLog().debug("Appending excludes: " + excludes);
            }

            testsToRun.add(testFileSet);

            if (alwaysRunTests != null) {
                // create  fileset
                final FileSet alwaysRunFileSet = new FileSet();
                alwaysRunFileSet.setProject(antProj);
                alwaysRunFileSet.setDir(testRootDir);
                alwaysRunFileSet.appendIncludes((String[]) alwaysRunTests.toArray(new String[alwaysRunTests.size()]));

                // add it to an AlwaysRunTestSet
                final CloverAlwaysRunTestSet alwaysRunTestSet = new CloverAlwaysRunTestSet();
                alwaysRunTestSet.setProject(antProj);
                alwaysRunTestSet.add(alwaysRunFileSet);

                // then add that to the OptimizedTestSet
                testsToRun.add(alwaysRunTestSet);
            }

        }
        return testsToRun.getOptimizedTestResource();
    }
View Full Code Here

Examples of com.cenqua.clover.types.CloverOptimizedTestSet

            }
        }

        getLog().debug("Effective filtering: includes=" + includes + ", excludes=" + excludes);
       
        final CloverOptimizedTestSet testsToRun = new CloverOptimizedTestSet();
        testsToRun.setProject(antProj);
        testsToRun.setLogger(new MvnLogger(getLog()));
        testsToRun.setFullRunEvery(fullRunEvery);
        testsToRun.setDebug(debug);

        testsToRun.setSnapshotFile(new ConfigUtil(this).resolveSnapshotFile(snapshot));
        if (ordering != null) {
            CloverOptimizedTestSet.TestOrdering order = new CloverOptimizedTestSet.TestOrdering();
            order.setValue(ordering);
            testsToRun.setOrdering(order);
        }
        testsToRun.setMinimize(minimize);
        testsToRun.setEnabled(enabled);

        antProj.setProperty(CloverNames.PROP_INITSTRING, resolveCloverDatabase());
        antProj.setName(getProject().getName());

        final List testSources = getProject().getTestCompileSourceRoots();

        for (Iterator iterator = testSources.iterator(); iterator.hasNext();) {
            addTestRoot(antProj, includes, excludes, testsToRun, (String) iterator.next());
        }
        return testsToRun.getOptimizedTestResource();
    }
View Full Code Here

Examples of com.cenqua.clover.types.CloverOptimizedTestSet

        }

        final List includes = optimizeIncludes != null ? optimizeIncludes : (surefireIncludes != null) ? surefireIncludes : DEFAULT_INCLUDES;
        final List excludes = optimizeExcludes != null ? optimizeExcludes : surefireExcludes;

        final CloverOptimizedTestSet testsToRun = new CloverOptimizedTestSet();
        testsToRun.setProject(antProj);
        testsToRun.setLogger(new MvnLogger(getLog()));
        testsToRun.setFullRunEvery(fullRunEvery);
        testsToRun.setSnapshotFile(snapshot);
        if (ordering != null) {
            CloverOptimizedTestSet.TestOrdering order = new CloverOptimizedTestSet.TestOrdering();
            order.setValue(ordering);
            testsToRun.setOrdering(order);
        }
        testsToRun.setMinimize(minimize);
        testsToRun.setEnabled(enabled);

        antProj.setProperty(CloverNames.PROP_INITSTRING, resolveCloverDatabase());
        antProj.setName(getProject().getName());

        final List testSources = getProject().getTestCompileSourceRoots();

        for (Iterator iterator = testSources.iterator(); iterator.hasNext();) {
            String testRoot = (String) iterator.next();
            final File testRootDir = new File(testRoot);
            if (!testRootDir.exists()) {
                // if the test dir does not exist, do not add this as a fileset.
                continue;
            }

            FileSet testFileSet = new FileSet();
            testFileSet.setProject(antProj);

            testFileSet.setDir(testRootDir);


            testFileSet.appendIncludes((String[]) includes.toArray(new String[includes.size()]));
            getLog().debug("Appending includes: " + includes);

            if (excludes != null && excludes.size() > 0) {
                testFileSet.appendExcludes((String[]) excludes.toArray(new String[excludes.size()]));
                getLog().debug("Appending excludes: " + excludes);
            }

            testsToRun.add(testFileSet);

            if (alwaysRunTests != null) {
                // create  fileset
                final FileSet alwaysRunFileSet = new FileSet();
                alwaysRunFileSet.setProject(antProj);
                alwaysRunFileSet.setDir(testRootDir);
                alwaysRunFileSet.appendIncludes((String[]) alwaysRunTests.toArray(new String[alwaysRunTests.size()]));

                // add it to an AlwaysRunTestSet
                final CloverAlwaysRunTestSet alwaysRunTestSet = new CloverAlwaysRunTestSet();
                alwaysRunTestSet.setProject(antProj);
                alwaysRunTestSet.add(alwaysRunFileSet);

                // then add that to the OptimizedTestSet
                testsToRun.add(alwaysRunTestSet);
            }

        }
        return testsToRun.getOptimizedTestResource();
    }
View Full Code Here

Examples of com.cenqua.clover.types.CloverOptimizedTestSet

            }
        }

        getLog().debug("Effective filtering: includes=" + includes + ", excludes=" + excludes);
       
        final CloverOptimizedTestSet testsToRun = new CloverOptimizedTestSet();
        testsToRun.setProject(antProj);
        testsToRun.setLogger(new MvnLogger(getLog()));
        testsToRun.setFullRunEvery(fullRunEvery);
        testsToRun.setDebug(debug);

        testsToRun.setSnapshotFile(new ConfigUtil(this).resolveSnapshotFile(snapshot));
        if (ordering != null) {
            CloverOptimizedTestSet.TestOrdering order = new CloverOptimizedTestSet.TestOrdering();
            order.setValue(ordering);
            testsToRun.setOrdering(order);
        }
        testsToRun.setMinimize(minimize);
        testsToRun.setEnabled(enabled);

        antProj.setProperty(CloverNames.PROP_INITSTRING, resolveCloverDatabase());
        antProj.setName(getProject().getName());

        final List testSources = getProject().getTestCompileSourceRoots();

        for (Iterator iterator = testSources.iterator(); iterator.hasNext();) {
            String testRoot = (String) iterator.next();
            final File testRootDir = new File(testRoot);
            if (!testRootDir.exists()) {
                // if the test dir does not exist, do not add this as a fileset.
                continue;
            }

            getLog().info("Adding fileset: directory=" + testRootDir + ", includes=" + includes + ", excludes=" + excludes);

            testsToRun.add(createFileSet(antProj, testRootDir, includes, excludes));

            if (alwaysRunTests != null) {
                // create  fileset
                final FileSet alwaysRunFileSet = createFileSet(antProj, testRootDir, alwaysRunTests, null);

                // add it to an AlwaysRunTestSet
                final CloverAlwaysRunTestSet alwaysRunTestSet = new CloverAlwaysRunTestSet();
                alwaysRunTestSet.setProject(antProj);
                alwaysRunTestSet.add(alwaysRunFileSet);

                // then add that to the OptimizedTestSet
                testsToRun.add(alwaysRunTestSet);
            }

        }
        return testsToRun.getOptimizedTestResource();
    }
View Full Code Here

Examples of com.cenqua.clover.types.CloverOptimizedTestSet

            }
        }

        getLog().debug("Effective filtering: includes=" + includes + ", excludes=" + excludes);
       
        final CloverOptimizedTestSet testsToRun = new CloverOptimizedTestSet();
        testsToRun.setProject(antProj);
        testsToRun.setLogger(new MvnLogger(getLog()));
        testsToRun.setFullRunEvery(fullRunEvery);
        testsToRun.setDebug(debug);

        testsToRun.setSnapshotFile(new ConfigUtil(this).resolveSnapshotFile(snapshot));
        if (ordering != null) {
            final CloverOptimizedTestSet.TestOrdering order = new CloverOptimizedTestSet.TestOrdering();
            order.setValue(ordering);
            testsToRun.setOrdering(order);
        }
        testsToRun.setMinimize(minimize);
        testsToRun.setEnabled(enabled);

        antProj.setProperty(CloverNames.PROP_INITSTRING, resolveCloverDatabase());
        antProj.setName(getProject().getName());

        final List testSources = getProject().getTestCompileSourceRoots();

        for (final Iterator iterator = testSources.iterator(); iterator.hasNext();) {
            addTestRoot(antProj, includes, excludes, testsToRun, (String) iterator.next());
        }
        return testsToRun.getOptimizedTestResource();
    }
View Full Code Here

Examples of com.cenqua.clover.types.CloverOptimizedTestSet

        }

        final List includes = optimizeIncludes != null ? optimizeIncludes : (surefireIncludes != null) ? surefireIncludes : DEFAULT_INCLUDES;
        final List excludes = optimizeExcludes != null ? optimizeExcludes : surefireExcludes;

        final CloverOptimizedTestSet testsToRun = new CloverOptimizedTestSet();
        testsToRun.setProject(antProj);
        testsToRun.setLogger(new MvnLogger(getLog()));
        testsToRun.setFullRunEvery(fullRunEvery);
        testsToRun.setDebug(debug);

        testsToRun.setSnapshotFile(new ConfigUtil(this).resolveSnapshotFile(snapshot));
        if (ordering != null) {
            CloverOptimizedTestSet.TestOrdering order = new CloverOptimizedTestSet.TestOrdering();
            order.setValue(ordering);
            testsToRun.setOrdering(order);
        }
        testsToRun.setMinimize(minimize);
        testsToRun.setEnabled(enabled);

        antProj.setProperty(CloverNames.PROP_INITSTRING, resolveCloverDatabase());
        antProj.setName(getProject().getName());

        final List testSources = getProject().getTestCompileSourceRoots();

        for (Iterator iterator = testSources.iterator(); iterator.hasNext();) {
            String testRoot = (String) iterator.next();
            final File testRootDir = new File(testRoot);
            if (!testRootDir.exists()) {
                // if the test dir does not exist, do not add this as a fileset.
                continue;
            }

            FileSet testFileSet = new FileSet();
            testFileSet.setProject(antProj);

            testFileSet.setDir(testRootDir);


            testFileSet.appendIncludes((String[]) includes.toArray(new String[includes.size()]));
            getLog().debug("Appending includes: " + includes);

            if (excludes != null && excludes.size() > 0) {
                testFileSet.appendExcludes((String[]) excludes.toArray(new String[excludes.size()]));
                getLog().debug("Appending excludes: " + excludes);
            }

            testsToRun.add(testFileSet);

            if (alwaysRunTests != null) {
                // create  fileset
                final FileSet alwaysRunFileSet = new FileSet();
                alwaysRunFileSet.setProject(antProj);
                alwaysRunFileSet.setDir(testRootDir);
                alwaysRunFileSet.appendIncludes((String[]) alwaysRunTests.toArray(new String[alwaysRunTests.size()]));

                // add it to an AlwaysRunTestSet
                final CloverAlwaysRunTestSet alwaysRunTestSet = new CloverAlwaysRunTestSet();
                alwaysRunTestSet.setProject(antProj);
                alwaysRunTestSet.add(alwaysRunFileSet);

                // then add that to the OptimizedTestSet
                testsToRun.add(alwaysRunTestSet);
            }

        }
        return testsToRun.getOptimizedTestResource();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.