use of de.dagere.peass.vcs.GitCommit in project peass by DaGeRe.
the class DependencyParallelReader method startPartProcess.
public void startPartProcess(final ResultsFolders currentOutFolders, final ExecutorService service, final int outfileIndex, final PeassFolders foldersTemp) throws InterruptedException {
final int min = outfileIndex * sizePerThread;
final int max = Math.min((outfileIndex + 1) * sizePerThread + 1, commits.size());
LOG.debug("Min: {} Max: {} Size: {}", min, max, commits.size());
final List<GitCommit> currentCommits = commits.subList(min, max);
final List<GitCommit> reserveCommits = commits.subList(max - 1, commits.size());
final GitCommit minimumCommit = commits.get(Math.min(max, commits.size() - 1));
if (currentCommits.size() > 0) {
processCommits(currentOutFolders, service, foldersTemp, currentCommits, reserveCommits, minimumCommit);
}
}
use of de.dagere.peass.vcs.GitCommit in project peass by DaGeRe.
the class TestChangedIterationReading method testChangedIterationReading.
@Test
public void testChangedIterationReading() throws InterruptedException {
VersionComparator.setVersions(Arrays.asList(new GitCommit("a23e385264c31def8dcda86c3cf64faa698c62d8", null, null, null), new GitCommit("33ce17c04b5218c25c40137d4d09f40fbb3e4f0f", null, null, null)));
ProjectStatistics statistics = new ProjectStatistics();
AnalyseFullData afd = new AnalyseFullData(new File("target/changes.json"), statistics, null, new StatisticsConfig());
afd.analyseFolder(new File(DATA_FOLDER, "measurement_a23e385264c31def8dcda86c3cf64faa698c62d8_33ce17c04b5218c25c40137d4d09f40fbb3e4f0f/measurements"));
TestcaseStatistic testcaseStatistic = statistics.getStatistics().get("a23e385264c31def8dcda86c3cf64faa698c62d8").get(new TestCase("de.test.CalleeTest#onlyCallMethod2"));
System.out.println(testcaseStatistic);
System.out.println(testcaseStatistic.getDeviationCurrent());
System.out.println(testcaseStatistic.getDeviationOld());
MatcherAssert.assertThat(testcaseStatistic.getDeviationCurrent(), Matchers.lessThan(800000d));
MatcherAssert.assertThat(testcaseStatistic.getDeviationOld(), Matchers.lessThan(800000d));
}
use of de.dagere.peass.vcs.GitCommit in project peass by DaGeRe.
the class RegressionTestSelectionContinueStarter method createIterator.
private VersionIterator createIterator(final TestSelectionConfigMixin config, final String previousVersion) {
final List<GitCommit> commits = CommitUtil.getGitCommits(executionConfigMixin.getStartversion(), executionConfigMixin.getEndversion(), config.getProjectFolder());
commits.add(0, new GitCommit(previousVersion, "", "", ""));
final GitCommit previous = new GitCommit(previousVersion, "", "", "");
final VersionIterator iterator = new VersionIteratorGit(config.getProjectFolder(), commits, previous);
return iterator;
}
use of de.dagere.peass.vcs.GitCommit in project peass by DaGeRe.
the class GetValidationExecutionFile method checkVersions.
public static void checkVersions(final ExecutionData changedTests, final ExecutionData selected, final List<GitCommit> commits, final Map<String, String> projectCommits) {
for (GitCommit commit : commits) {
boolean contains = Arrays.stream(CHANGE_INDICATORS).anyMatch(commit.getMessage()::contains);
if (contains && !excluded.contains(commit.getTag())) {
TestSet versionsTests = changedTests.getVersions().get(commit.getTag());
if (versionsTests != null) {
selected.getVersions().put(commit.getTag(), versionsTests);
projectCommits.put(commit.getTag(), commit.getMessage().trim());
} else {
selected.getVersions().put(commit.getTag(), new TestSet());
projectCommits.put(commit.getTag(), commit.getMessage().trim());
}
}
}
}
use of de.dagere.peass.vcs.GitCommit in project peass by DaGeRe.
the class TestContinuousExecutor method initRepo.
private void initRepo() throws ZipException {
ZipFile file = new ZipFile(new File("src/test/resources/simple-test-1.zip"));
file.extractAll(DependencyTestConstants.CURRENT.getAbsolutePath());
VersionComparator.setVersions(Arrays.asList(new GitCommit[] { new GitCommit("33ce17c04b5218c25c40137d4d09f40fbb3e4f0f", null, null, null), new GitCommit("a23e385264c31def8dcda86c3cf64faa698c62d8", null, null, null) }));
}
Aggregations