Skip to content

Commit 57af2d5

Browse files
committed
Mutant folder is not deleted if not compiles
1 parent 85d7c06 commit 57af2d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uniandes/tsdl/mutapk/processors/MutationsProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ public void process(List<MutationLocation> locations, String extraPath, String a
7171
mutationLocation.setFilePath(newMutationPath);
7272
operator.performMutation(mutationLocation, writer, mutantIndex);
7373
Long mutationEnd = System.currentTimeMillis();
74-
APKToolWrapper.buildAPK(mutantRootFolder, extraPath, apkName, mutantIndex);
74+
boolean result = APKToolWrapper.buildAPK(mutantRootFolder, extraPath, apkName, mutantIndex);
7575
File mutatedFile = new File(newMutationPath);
7676
String fileName = (new File(newMutationPath)).getName();
7777
File mutantRootFolderDir = new File(mutantRootFolder+fileName);
7878
FileUtils.copyFile(mutatedFile, mutantRootFolderDir);
7979
File srcFolder = new File(mutantFolder);
80-
FileUtils.deleteDirectory(srcFolder);
80+
if(result) {FileUtils.deleteDirectory(srcFolder);}
8181
Long buildEnd = System.currentTimeMillis();
8282
Long mutationTime = mutationEnd-mutationIni;
8383
Long buildingTime = buildEnd - mutationEnd;

0 commit comments

Comments
 (0)