use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class DependenciesOnlyStartversionIT method cleanDependencies.
@BeforeEach
public void cleanDependencies() throws Exception {
FileUtils.deleteDirectory(ContinuousDependencyReaderIT.resultsFolders.getStaticTestSelectionFile().getParentFile());
Assert.assertFalse(ContinuousDependencyReaderIT.resultsFolders.getStaticTestSelectionFile().exists());
FileUtils.deleteDirectory(TestConstants.CURRENT_FOLDER);
builder = new GitProjectBuilder(TestConstants.CURRENT_FOLDER, new File("../dependency/src/test/resources/dependencyIT/basic_state"));
VersionIteratorGit iterator = new VersionIteratorGit(TestConstants.CURRENT_FOLDER);
iterator.goToFirstCommit();
ExecutionConfig executionConfig = new ExecutionConfig();
executionConfig.setVersion(iterator.getTag());
executionConfig.setVersionOld(iterator.getPrevious().getTag());
ContinuousDependencyReader reader = new ContinuousDependencyReader(DependencyTestConstants.DEFAULT_CONFIG_NO_VIEWS, executionConfig, new KiekerConfig(true), new PeassFolders(TestConstants.CURRENT_FOLDER), ContinuousDependencyReaderIT.resultsFolders, new EnvironmentVariables());
dependencies = reader.getDependencies(iterator, "");
Assert.assertEquals(0, dependencies.getVersions().size());
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class KiekerConfigMixin method getKiekerConfig.
public KiekerConfig getKiekerConfig() {
KiekerConfig kiekerConfig = new KiekerConfig(true);
kiekerConfig.setUseCircularQueue(useCircularQueue);
kiekerConfig.setUseSelectiveInstrumentation(!notUseSelectiveInstrumentation);
kiekerConfig.setUseAggregation(useAggregation);
kiekerConfig.setExtractMethod(useExtraction);
kiekerConfig.setAdaptiveInstrumentation(enableAdaptiveInstrumentation);
kiekerConfig.setUseSourceInstrumentation(!notUseSourceInstrumentation);
kiekerConfig.setKiekerQueueSize(kiekerQueueSize);
kiekerConfig.setTraceSizeInMb(traceSizeInMb);
kiekerConfig.setOnlyOneCallRecording(onlyOneCallRecording);
if (excludeForTracing != null) {
LinkedHashSet<String> excludedForTracing = new LinkedHashSet<>();
for (String exclude : excludeForTracing) {
excludedForTracing.add(exclude);
}
kiekerConfig.setExcludeForTracing(excludedForTracing);
}
kiekerConfig.check();
return kiekerConfig;
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class TestContinuousDependencyReader method testNoChangeHappened.
@Test
public void testNoChangeHappened() throws JsonGenerationException, JsonMappingException, IOException {
ResultsFolders resultsFolders = new ResultsFolders(new File("target/current_results"), "current");
StaticTestSelection value = new StaticTestSelection();
value.setInitialversion(new InitialVersion());
value.getVersions().put("A", new VersionStaticSelection());
Constants.OBJECTMAPPER.writeValue(resultsFolders.getStaticTestSelectionFile(), value);
ContinuousDependencyReader reader = new ContinuousDependencyReader(new TestSelectionConfig(1, false), new ExecutionConfig(), new KiekerConfig(), new PeassFolders(new File("target/current")), resultsFolders, new EnvironmentVariables());
reader.getDependencies(null, "git:dummyUrl");
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class RegressionTestSelectionStarter method readExecutions.
public void readExecutions(final String project, final List<GitCommit> commits) throws InterruptedException, IOException, JsonGenerationException, JsonMappingException, JAXBException {
KiekerConfig kiekerConfig = kiekerConfigMixin.getKiekerConfig();
ExecutionConfig executionConfig = executionConfigMixin.getExecutionConfig();
final DependencyParallelReader reader = new DependencyParallelReader(config.getProjectFolder(), config.getResultBaseFolder(), project, commits, config.getDependencyConfig(), executionConfig, kiekerConfig, new EnvironmentVariables());
final ResultsFolders[] outFiles = reader.readDependencies();
LOG.debug("Files: {}", outFiles);
ResultsFolders mergedFolders = new ResultsFolders(config.getResultBaseFolder(), project);
final File out = mergedFolders.getStaticTestSelectionFile();
final StaticTestSelection all = PartialDependenciesMerger.mergeVersions(out, outFiles);
final PeassFolders folders = new PeassFolders(config.getProjectFolder());
final File dependencyTempFiles = new File(folders.getTempProjectFolder().getParentFile(), "dependencyTempFiles");
FileUtils.moveDirectory(folders.getTempProjectFolder(), dependencyTempFiles);
ExecutionData executionData = PartialDependenciesMerger.mergeExecutions(mergedFolders, outFiles);
mergeViews(outFiles, mergedFolders);
if (!config.isDoNotGenerateProperties()) {
ResultsFolders resultsFolders = new ResultsFolders(config.getResultBaseFolder(), project);
final PropertyReader propertyReader = new PropertyReader(resultsFolders, config.getProjectFolder(), executionData, executionConfig);
propertyReader.readAllTestsProperties();
}
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class JmhDependencyReaderMultiParamTest method testVersionReading.
@Test
public void testVersionReading() throws IOException, InterruptedException, XmlPullParserException, ParseException, ViewNotFoundException, ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
try (MockedStatic<GitUtils> gitUtilsMock = Mockito.mockStatic(GitUtils.class)) {
FakeGitUtil.prepareGitUtils(gitUtilsMock);
FakeFileIterator iterator = mockIterator();
ResultsFolders resultsFolders = new ResultsFolders(TraceGettingIT.VIEW_IT_PROJECTFOLDER, "test");
TestSelectionConfig dependencyConfig = new TestSelectionConfig(1, false, true, false);
ExecutionConfig jmhConfig = new ExecutionConfig();
jmhConfig.setTestTransformer("de.dagere.peass.dependency.jmh.JmhTestTransformer");
jmhConfig.setTestExecutor("de.dagere.peass.dependency.jmh.JmhTestExecutor");
DependencyReader reader = new DependencyReader(dependencyConfig, new PeassFolders(TestConstants.CURRENT_FOLDER), resultsFolders, "", iterator, new VersionKeeper(new File("/dev/null")), jmhConfig, new KiekerConfig(true), new EnvironmentVariables());
reader.readInitialVersion();
checkInitialVersion(resultsFolders);
reader.readDependencies();
checkChangedVersion(resultsFolders);
}
}
Aggregations