Search in sources :

Example 11 with VersionChangeProperties

use of de.dagere.peass.analysis.properties.VersionChangeProperties in project peass by DaGeRe.

the class GetAllChanges method getChangesForMeasurementfolder.

public static void getChangesForMeasurementfolder(final RepoFolders folders, final String project, final File cleanFolder, final StaticTestSelection dependencies) throws JAXBException, FileNotFoundException {
    ResultsFolders resultsFolders = new ResultsFolders(folders.getProjectStatisticsFolder(project), project);
    final ChangeReader reader = new ChangeReader(resultsFolders, project, dependencies);
    final ProjectChanges changes = reader.readFile(cleanFolder);
    if (changes != null) {
        final File allPropertyFile = new File(folders.getPropertiesFolder(), project + File.separator + "properties_alltests.json");
        if (allPropertyFile.exists()) {
            final VersionChangeProperties properties = ReadProperties.readVersionProperties(changes, allPropertyFile);
            try {
                // final ProjectChanges oldKnowledge = ProjectChanges.getOldChanges();
                // ProjectChanges.mergeKnowledge(oldKnowledge, knowledge);
                // ReadProperties.writeOnlySource(properties, oldKnowledge);
                Constants.OBJECTMAPPER.writeValue(folders.getProjectPropertyFile(project), properties);
            } catch (final IOException e) {
                e.printStackTrace();
            }
        }
    }
}
Also used : ProjectChanges(de.dagere.peass.analysis.changes.ProjectChanges) ChangeReader(de.dagere.peass.analysis.changes.ChangeReader) IOException(java.io.IOException) ResultsFolders(de.dagere.peass.folders.ResultsFolders) VersionChangeProperties(de.dagere.peass.analysis.properties.VersionChangeProperties) File(java.io.File)

Aggregations

VersionChangeProperties (de.dagere.peass.analysis.properties.VersionChangeProperties)11 File (java.io.File)10 ProjectChanges (de.dagere.peass.analysis.changes.ProjectChanges)6 ChangeProperties (de.dagere.peass.analysis.properties.ChangeProperties)6 RepoFolders (de.dagere.peass.analysis.all.RepoFolders)5 ChangeProperty (de.dagere.peass.analysis.properties.ChangeProperty)5 LinkedList (java.util.LinkedList)4 List (java.util.List)4 Classification (de.dagere.peass.analysis.groups.Classification)3 Change (de.dagere.peass.analysis.changes.Change)2 Changes (de.dagere.peass.analysis.changes.Changes)2 GuessDecider (de.dagere.peass.analysis.guessing.GuessDecider)2 ChangedEntity (de.dagere.peass.dependency.analysis.data.ChangedEntity)2 TestSet (de.dagere.peass.dependency.analysis.data.TestSet)2 ExecutionData (de.dagere.peass.dependency.persistence.ExecutionData)2 BufferedWriter (java.io.BufferedWriter)2 FileWriter (java.io.FileWriter)2 IOException (java.io.IOException)2 ChangeReader (de.dagere.peass.analysis.changes.ChangeReader)1 TestcaseClass (de.dagere.peass.analysis.groups.TestcaseClass)1