DaGeRe/peass

Read all result files when executing 'getchanges' command

Closed this issue · 3 comments

The readCleanFolder method of the ChangeReader class ignores some result files because generally it does not select the directory that contains all results files:

File versionFolder = cleanFolder.listFiles()[0].listFiles()[0];
File testcaseFolder = versionFolder.listFiles()[0].listFiles()[0];

The best solution should be to iterate over all files of the cleanFolder directory. However, currently this is not possible since cleanFolder contains every result file multiple times.

Thanks for the hint. The basic problem was, that there were three ways of cleaning folders:

  • One that is done automatically at the end of each measurement process in DependencyTestStarter,
  • One that is done automatically from CleaningStarter, and
  • One that is was done when called automatically from MeasurementDataCleaner.
    The last one did not make sense as it was doing very similar stuff to CleaningStarter, so it is removed now.

The first two saved the resulting data in different folder structures; the DependencyTestStarter used clean/$version/$versionOld/$testclass/$method, the CleaningStarter only used clean/$projectFolder/$projectFolder. This did not really make sense; therefore, now the DependencyTestStarter directly saves to clean/native and the CleaningStarter saves to clean/$projectFolder. Therefore, the analysis is now easier and just takes all subfolders in clean.

This should work for you if you just call clean again with the name of the _peass-folder and the dependencyfile / executionfile. Does this work for you?

Yes, this works. Is it always necessary to call clean before getchanges?

Fine, than I'll close this.

Is it always necessary to call clean before getchanges?

No, only if you want to re-clean existing data (e.g. because some error happened during cleaning). As end-user, this should nearly never be necessary.