diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/config/MetaTest.java b/andy/src/main/java/nl/tudelft/cse1110/andy/config/MetaTest.java index 3c12a0ac..059ff8c9 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/config/MetaTest.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/config/MetaTest.java @@ -1,7 +1,6 @@ package nl.tudelft.cse1110.andy.config; import nl.tudelft.cse1110.andy.execution.Context.Context; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import nl.tudelft.cse1110.andy.execution.metatest.AbstractMetaTestFactory; public interface MetaTest { @@ -37,11 +36,4 @@ static MetaTest insertAt(String name, int lineToInsertStartingIn1, String conten return new AbstractMetaTestFactory().insertAt(name, lineToInsertStartingIn1, contentToAdd); } - static MetaTest withExternalProcess(int weight, String name, ExternalProcess externalProcess) { - return new AbstractMetaTestFactory().withExternalProcess(weight, name, externalProcess); - } - - static MetaTest withExternalProcess(String name, ExternalProcess externalProcess) { - return new AbstractMetaTestFactory().withExternalProcess(name, externalProcess); - } } diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/config/RunConfiguration.java b/andy/src/main/java/nl/tudelft/cse1110/andy/config/RunConfiguration.java index 25af1fe0..fee7f048 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/config/RunConfiguration.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/config/RunConfiguration.java @@ -1,9 +1,7 @@ package nl.tudelft.cse1110.andy.config; import nl.tudelft.cse1110.andy.codechecker.engine.CheckScript; -import nl.tudelft.cse1110.andy.execution.externalprocess.EmptyExternalProcess; import nl.tudelft.cse1110.andy.execution.mode.Mode; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.Collections; import java.util.List; @@ -29,10 +27,19 @@ public abstract class RunConfiguration { "EXPERIMENTAL_BIG_INTEGER", "EXPERIMENTAL_NAKED_RECEIVER", "EXPERIMENTAL_MEMBER_VARIABLE", "ABS", "AOR", "AOD", "CRCR", "OBBN", "ROR", "UOI"); + private static List ZIPPED = Collections.emptyList(); + public abstract List classesUnderTest(); public abstract Map weights(); + public void setZippedFiles(List files) { + ZIPPED = files; + }; + + public List getZippedFiles() { + return ZIPPED; + } public CheckScript checkScript() { return new CheckScript(Collections.emptyList()); } @@ -57,10 +64,6 @@ public Mode mode() { return Mode.PRACTICE; } - public ExternalProcess externalProcess() { - return new EmptyExternalProcess(); - } - public String successMessage() { return null; } diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/config/SecureExamRunConfiguration.java b/andy/src/main/java/nl/tudelft/cse1110/andy/config/SecureExamRunConfiguration.java index 75af9acc..f7694e67 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/config/SecureExamRunConfiguration.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/config/SecureExamRunConfiguration.java @@ -1,7 +1,5 @@ package nl.tudelft.cse1110.andy.config; -import com.google.common.collect.ImmutableMap; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import nl.tudelft.cse1110.andy.execution.mode.Mode; import java.util.Collections; @@ -15,13 +13,11 @@ public class SecureExamRunConfiguration extends RunConfiguration { private final String successMessage; private final List listOfMutants; private final int numberOfMutationsToConsider; - private final ExternalProcess externalProcess; public SecureExamRunConfiguration(RunConfiguration runConfigurationToClone) { this.classesUnderTest = runConfigurationToClone.classesUnderTest(); this.listOfMutants = runConfigurationToClone.listOfMutants(); this.numberOfMutationsToConsider = runConfigurationToClone.numberOfMutationsToConsider(); - this.externalProcess = runConfigurationToClone.externalProcess(); this.successMessage = runConfigurationToClone.successMessage(); } @@ -30,13 +26,14 @@ public Mode mode() { } @Override + @SuppressWarnings("DoubleBraceInitialization") public Map weights() { - return new HashMap<>(ImmutableMap.of( - "coverage", 0.25f, - "mutation", 0.25f, - "meta", 0.25f, - "codechecks", 0.25f - )); + return new HashMap<>() {{ + put("coverage", 0.25f); + put("mutation", 0.25f); + put("meta", 0.25f); + put("codechecks", 0.25f); + }}; } @Override @@ -52,10 +49,6 @@ public int numberOfMutationsToConsider() { return numberOfMutationsToConsider; } - public ExternalProcess externalProcess() { - return externalProcess; - } - public String successMessage() { return successMessage; } diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/Context.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/Context.java index 4c3e4c18..b587974f 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/Context.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/Context.java @@ -3,10 +3,8 @@ import nl.tudelft.cse1110.andy.config.DirectoryConfiguration; import nl.tudelft.cse1110.andy.config.RunConfiguration; import nl.tudelft.cse1110.andy.execution.ExecutionFlow; -import nl.tudelft.cse1110.andy.execution.externalprocess.EmptyExternalProcess; import nl.tudelft.cse1110.andy.execution.mode.Action; import nl.tudelft.cse1110.andy.execution.mode.ModeActionSelector; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import org.jacoco.core.runtime.IRuntime; import org.jacoco.core.runtime.RuntimeData; @@ -21,7 +19,6 @@ public class Context { private ExecutionFlow flow; private final Action action; private ModeActionSelector modeActionSelector; - private ExternalProcess externalProcess; private ClassLoader classloaderWithStudentsCode; private final List librariesToBeIncludedInCompilation; private IRuntime jacocoRuntime; @@ -29,7 +26,7 @@ public class Context { public Context(ClassLoader cleanClassloader, DirectoryConfiguration directoryConfiguration, RunConfiguration runConfiguration, List fullClassNames, ExecutionFlow flow, - Action action, ModeActionSelector modeActionSelector, ExternalProcess externalProcess, + Action action, ModeActionSelector modeActionSelector, ClassLoader classloaderWithStudentsCode, List librariesToBeIncludedInCompilation, IRuntime jacocoRuntime, RuntimeData jacocoData) { this.cleanClassloader = cleanClassloader; @@ -39,7 +36,6 @@ public Context(ClassLoader cleanClassloader, DirectoryConfiguration directoryCon this.flow = flow; this.action = action; this.modeActionSelector = modeActionSelector; - this.externalProcess = externalProcess; this.classloaderWithStudentsCode = classloaderWithStudentsCode; this.librariesToBeIncludedInCompilation = librariesToBeIncludedInCompilation; this.jacocoRuntime = jacocoRuntime; @@ -60,16 +56,6 @@ public void setModeSelector(ModeActionSelector modeActionSelector) { this.modeActionSelector = modeActionSelector; } - public void setExternalProcess(ExternalProcess externalProcess) { - this.externalProcess = externalProcess; - } - - public void killExternalProcess() { - // Retrieve error messages before killing process - externalProcess.extractErrorMessages(); - - externalProcess.kill(); - } public void setClassloaderWithStudentsCode(ClassLoader classloaderWithStudentsCode) { this.classloaderWithStudentsCode = classloaderWithStudentsCode; @@ -112,10 +98,6 @@ public ModeActionSelector getModeActionSelector() { return modeActionSelector; } - public ExternalProcess getExternalProcess() { - return externalProcess; - } - public ClassLoader getClassloaderWithStudentsCode() { return classloaderWithStudentsCode; } diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/ContextBuilder.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/ContextBuilder.java index 368d87cb..87c5c4b5 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/ContextBuilder.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/ContextBuilder.java @@ -3,7 +3,6 @@ import nl.tudelft.cse1110.andy.config.DirectoryConfiguration; import nl.tudelft.cse1110.andy.config.RunConfiguration; import nl.tudelft.cse1110.andy.execution.ExecutionFlow; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import nl.tudelft.cse1110.andy.execution.mode.Action; import nl.tudelft.cse1110.andy.execution.mode.ModeActionSelector; import org.jacoco.core.runtime.IRuntime; @@ -19,7 +18,6 @@ public class ContextBuilder { private ExecutionFlow flow; private Action action; private ModeActionSelector modeActionSelector; - private ExternalProcess externalProcess; private ClassLoader classloaderWithStudentsCode; private List librariesToBeIncludedInCompilation; private IRuntime jacocoRuntime; @@ -45,9 +43,6 @@ public void setAction(Action action) { this.action = action; } - public void setExternalProcess(ExternalProcess externalProcess) { - this.externalProcess = externalProcess; - } public void setLibrariesToBeIncludedInCompilation(List librariesToBeIncludedInCompilation) { this.librariesToBeIncludedInCompilation = librariesToBeIncludedInCompilation; @@ -55,7 +50,7 @@ public void setLibrariesToBeIncludedInCompilation(List librariesToBeIncl public Context buildContext() { return new Context(cleanClassloader, directoryConfiguration, runConfiguration, fullClassNames, flow, - action, modeActionSelector, externalProcess, classloaderWithStudentsCode, + action, modeActionSelector, classloaderWithStudentsCode, librariesToBeIncludedInCompilation, jacocoRuntime, jacocoData); } } diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/ContextDirector.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/ContextDirector.java index 4bc3f798..408616a7 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/ContextDirector.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/Context/ContextDirector.java @@ -1,7 +1,6 @@ package nl.tudelft.cse1110.andy.execution.Context; import nl.tudelft.cse1110.andy.config.DirectoryConfiguration; -import nl.tudelft.cse1110.andy.execution.externalprocess.EmptyExternalProcess; import nl.tudelft.cse1110.andy.execution.mode.Action; import java.util.List; @@ -53,6 +52,5 @@ private void setBase(Action action, DirectoryConfiguration directoryConfiguratio contextBuilder.setCleanClassloader(Thread.currentThread().getContextClassLoader()); contextBuilder.setAction(action); contextBuilder.setDirectoryConfiguration(directoryConfiguration); - contextBuilder.setExternalProcess(new EmptyExternalProcess()); } } diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/ExecutionFlow.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/ExecutionFlow.java index 78658ccd..cfd9d345 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/ExecutionFlow.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/ExecutionFlow.java @@ -35,8 +35,6 @@ public Result run() { } } while (!steps.isEmpty() && !resultBuilder.hasFailed()); - ctx.killExternalProcess(); - return resultBuilder.build(); } @@ -63,6 +61,7 @@ public static List basicSteps() { new CompilationStep(), new ReplaceClassloaderStep(), new GetRunConfigurationStep(), + new UnzipStep(), new ExamModeSecurityGuardStep(), new InjectModeActionStepsStep()); } diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/externalprocess/CommandExternalProcess.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/externalprocess/CommandExternalProcess.java deleted file mode 100644 index 595783dd..00000000 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/externalprocess/CommandExternalProcess.java +++ /dev/null @@ -1,130 +0,0 @@ -package nl.tudelft.cse1110.andy.execution.externalprocess; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.Scanner; -import java.util.concurrent.CountDownLatch; - -public class CommandExternalProcess implements ExternalProcess { - - private final String command; - private final String initSignal; - private final CountDownLatch initSignalLatch; - private final CountDownLatch exitLatch; - private String errorMessages; - - private Process process; - - public CommandExternalProcess(String command, String initSignal) { - this.command = command; - this.initSignal = initSignal; - this.initSignalLatch = new CountDownLatch(initSignal != null ? 1 : 0); - this.exitLatch = new CountDownLatch(1); - } - - @Override - public void launch() throws IOException { - process = Runtime.getRuntime().exec(command); - - process.onExit().thenAccept(p -> { - initSignalLatch.countDown(); - exitLatch.countDown(); - }); - - if (initSignal != null) { - Thread thread = new Thread(new OutputHandler()); - thread.start(); - } - } - - @Override - public void awaitInitialization() { - // In case await was called but no process was launched. - if (process == null) { - return; - } - - // Block thread until process has initialized - try { - this.initSignalLatch.await(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - } - - @Override - public void kill() { - boolean processIsRunning = process != null && process.isAlive(); - if (!processIsRunning) { - return; - } - - process.destroy(); - - // Block thread until process has exited - try { - this.exitLatch.await(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - } - - @Override - public int getExitCode() { - // Crashes after the tests have executed do not affect anything, so assume that the process exited normally - boolean aliveOrTerminated = this.process.isAlive() || this.process.exitValue() == 143; - - if (aliveOrTerminated) { - return 0; - } - - return this.process.exitValue(); - } - - @Override - public boolean hasExitedNormally() { - return this.getExitCode() == 0; - } - - @Override - public void extractErrorMessages() { - if (errorMessages == null) { - // stderr messages can only be retrieved from the process once - - try { - StringBuilder sb = new StringBuilder(); - BufferedReader reader = new BufferedReader(new InputStreamReader(process.getErrorStream())); - while (reader.ready()) { - String next = reader.readLine(); - sb.append(next); - } - errorMessages = sb.toString(); - } catch (IOException ex) { - ex.printStackTrace(); - errorMessages = ex.getMessage(); - } - } - } - - @Override - public String getErrorMessages() { - this.extractErrorMessages(); - - return errorMessages; - } - - private class OutputHandler implements Runnable { - @Override - public void run() { - Scanner data = new Scanner(process.getInputStream()); - - while (data.hasNextLine()) { - String line = data.nextLine(); - if (line.contains(initSignal)) { - initSignalLatch.countDown(); - } - } - } - } -} diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/externalprocess/EmptyExternalProcess.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/externalprocess/EmptyExternalProcess.java deleted file mode 100644 index eb9590b2..00000000 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/externalprocess/EmptyExternalProcess.java +++ /dev/null @@ -1,38 +0,0 @@ -package nl.tudelft.cse1110.andy.execution.externalprocess; - -public class EmptyExternalProcess implements ExternalProcess { - @Override - public void launch() { - - } - - @Override - public void awaitInitialization() { - - } - - @Override - public void kill() { - - } - - @Override - public void extractErrorMessages() { - - } - - @Override - public String getErrorMessages() { - return null; - } - - @Override - public boolean hasExitedNormally() { - return true; - } - - @Override - public int getExitCode() { - return 0; - } -} diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/externalprocess/ExternalProcess.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/externalprocess/ExternalProcess.java deleted file mode 100644 index e7bec8c1..00000000 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/externalprocess/ExternalProcess.java +++ /dev/null @@ -1,19 +0,0 @@ -package nl.tudelft.cse1110.andy.execution.externalprocess; - -import java.io.IOException; - -public interface ExternalProcess { - void launch() throws IOException; - - void awaitInitialization(); - - void kill(); - - void extractErrorMessages(); - - String getErrorMessages(); - - boolean hasExitedNormally(); - - int getExitCode(); -} diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/metatest/AbstractMetaTestFactory.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/metatest/AbstractMetaTestFactory.java index 3f704999..a544b596 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/metatest/AbstractMetaTestFactory.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/metatest/AbstractMetaTestFactory.java @@ -1,11 +1,9 @@ package nl.tudelft.cse1110.andy.execution.metatest; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import nl.tudelft.cse1110.andy.execution.metatest.library.evaluators.InsertAtEvaluator; import nl.tudelft.cse1110.andy.execution.metatest.library.evaluators.LineReplacementEvaluator; import nl.tudelft.cse1110.andy.execution.metatest.library.evaluators.MetaEvaluator; import nl.tudelft.cse1110.andy.execution.metatest.library.evaluators.StringReplacementEvaluator; -import nl.tudelft.cse1110.andy.execution.metatest.externalprocess.ExternalProcessMetaTest; import nl.tudelft.cse1110.andy.execution.metatest.library.LibraryMetaTest; public class AbstractMetaTestFactory { @@ -37,11 +35,4 @@ public AbstractMetaTest insertAt(String name, int lineToInsertStartingIn1, Strin return insertAt(1, name, lineToInsertStartingIn1, contentToAdd); } - public AbstractMetaTest withExternalProcess(int weight, String name, ExternalProcess externalProcess) { - return new ExternalProcessMetaTest(weight, name, externalProcess); - } - - public AbstractMetaTest withExternalProcess(String name, ExternalProcess externalProcess) { - return withExternalProcess(1, name, externalProcess); - } } diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/metatest/externalprocess/ExternalProcessMetaTest.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/metatest/externalprocess/ExternalProcessMetaTest.java deleted file mode 100644 index a3891093..00000000 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/metatest/externalprocess/ExternalProcessMetaTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package nl.tudelft.cse1110.andy.execution.metatest.externalprocess; - -import nl.tudelft.cse1110.andy.config.DirectoryConfiguration; -import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.Context.Context; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; -import nl.tudelft.cse1110.andy.execution.metatest.AbstractMetaTest; -import nl.tudelft.cse1110.andy.execution.step.RunJUnitTestsStep; -import nl.tudelft.cse1110.andy.result.ResultBuilder; - -import java.io.IOException; - -public class ExternalProcessMetaTest extends AbstractMetaTest { - private final ExternalProcess externalProcess; - - public ExternalProcessMetaTest(int weight, String name, ExternalProcess externalProcess) { - super(weight, name); - this.externalProcess = externalProcess; - } - - public void startExternalProcess() throws IOException { - this.externalProcess.launch(); - this.externalProcess.awaitInitialization(); - } - - public void killExternalProcess() { - this.externalProcess.kill(); - } - - @Override - public boolean execute(Context ctx, DirectoryConfiguration dirCfg, RunConfiguration runCfg) throws Exception { - /* Start the meta external process */ - this.startExternalProcess(); - - ResultBuilder metaResultBuilder = new ResultBuilder(null, null); - - RunJUnitTestsStep jUnitStep = new RunJUnitTestsStep(); - jUnitStep.execute(ctx, metaResultBuilder); - - /* Kill the meta external process */ - this.killExternalProcess(); - - /* - * Status and possible error messages of the meta external process are ignored. - * The external process may crash as part of normal operation as it is supposed to be a - * buggy implementation due to the nature of meta tests. - */ - - /* Check the result. If there's a failing test, the test suite is good! */ - int testsRan = metaResultBuilder.getTestResults().getTestsRan(); - int testsSucceeded = metaResultBuilder.getTestResults().getTestsSucceeded(); - boolean passesTheMetaTest = testsSucceeded < testsRan; - - return passesTheMetaTest; - } -} diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/mode/ModeActionSelector.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/mode/ModeActionSelector.java index c2532c47..f8283f18 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/mode/ModeActionSelector.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/mode/ModeActionSelector.java @@ -103,7 +103,6 @@ private List getMetaTestMode() { public static List testsAndCoverage() { return List.of( - new RunExternalProcessStep(), new InstrumentCodeForCoverageStep(), new RunJUnitTestsStep(), new CollectCoverageInformationStep()); @@ -111,7 +110,6 @@ public static List testsAndCoverage() { public static List withMutationCoverage() { return List.of( - new RunExternalProcessStep(), new InstrumentCodeForCoverageStep(), new RunJUnitTestsStep(), new CollectCoverageInformationStep(), @@ -121,14 +119,12 @@ public static List withMutationCoverage() { public static List fullMode() { return List.of( - new RunExternalProcessStep(), new InstrumentCodeForCoverageStep(), new RunJUnitTestsStep(), new CollectCoverageInformationStep(), new RunPitestStep(), new RunPenaltyCodeChecksStep(), new RunCodeChecksStep(), - new KillExternalProcessStep(), new RunMetaTestsStep() ); } diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/KillExternalProcessStep.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/KillExternalProcessStep.java deleted file mode 100644 index ec484eb2..00000000 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/KillExternalProcessStep.java +++ /dev/null @@ -1,23 +0,0 @@ -package nl.tudelft.cse1110.andy.execution.step; - -import nl.tudelft.cse1110.andy.execution.Context.Context; -import nl.tudelft.cse1110.andy.execution.ExecutionStep; -import nl.tudelft.cse1110.andy.result.ResultBuilder; - -public class KillExternalProcessStep implements ExecutionStep { - - @Override - public void execute(Context ctx, ResultBuilder result) { - ctx.killExternalProcess(); - } - - @Override - public boolean equals(Object other) { - return other instanceof KillExternalProcessStep; - } - - @Override - public int hashCode() { - return super.hashCode(); - } -} diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/OrganizeSourceCodeStep.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/OrganizeSourceCodeStep.java index 7e7244b1..b6d3c3bb 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/OrganizeSourceCodeStep.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/OrganizeSourceCodeStep.java @@ -31,6 +31,9 @@ public void execute(Context ctx, ResultBuilder result) { createDirIfNeeded(directoryName); moveFile(pathOfJavaClass, directoryName, new File(pathOfJavaClass).getName()); } + + // new UnzipStep().execute(ctx, result); + } catch (Exception e) { result.genericFailure(this, e); } diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/RunExternalProcessStep.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/RunExternalProcessStep.java deleted file mode 100644 index 6eb7febc..00000000 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/RunExternalProcessStep.java +++ /dev/null @@ -1,38 +0,0 @@ -package nl.tudelft.cse1110.andy.execution.step; - -import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.Context.Context; -import nl.tudelft.cse1110.andy.execution.ExecutionStep; -import nl.tudelft.cse1110.andy.result.ResultBuilder; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; - -public class RunExternalProcessStep implements ExecutionStep { - - @Override - public void execute(Context ctx, ResultBuilder result) { - try { - RunConfiguration runConfiguration = ctx.getRunConfiguration(); - - ExternalProcess externalProcess = runConfiguration.externalProcess(); - - externalProcess.launch(); - - ctx.setExternalProcess(externalProcess); - - externalProcess.awaitInitialization(); - - } catch (Exception e) { - result.genericFailure(this, e); - } - } - - @Override - public boolean equals(Object other) { - return other instanceof RunExternalProcessStep; - } - - @Override - public int hashCode() { - return super.hashCode(); - } -} diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/UnzipStep.java b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/UnzipStep.java new file mode 100644 index 00000000..09017a98 --- /dev/null +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/execution/step/UnzipStep.java @@ -0,0 +1,93 @@ +package nl.tudelft.cse1110.andy.execution.step; + +import nl.tudelft.cse1110.andy.config.DirectoryConfiguration; +import nl.tudelft.cse1110.andy.execution.Context.Context; +import nl.tudelft.cse1110.andy.execution.ExecutionStep; +import nl.tudelft.cse1110.andy.result.ResultBuilder; + +import java.io.*; +import java.util.List; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; + +public class UnzipStep implements ExecutionStep { + + @Override + public void execute(Context ctx, ResultBuilder result) { + + try { + DirectoryConfiguration dirCfg = ctx.getDirectoryConfiguration(); + + List zippedFiles = ctx.getRunConfiguration().getZippedFiles(); + byte[] buffer = new byte[1024]; + File destDir = new File(dirCfg.getOutputDir()); + + if(zippedFiles.size() < 1){ + return; + } + + for (String fileP : zippedFiles) { + + ZipInputStream zis = new ZipInputStream(new FileInputStream(fileP)); + ZipEntry zipEntry = zis.getNextEntry(); + + while (zipEntry != null) { + File newFile = newFile(destDir, zipEntry); + + if (zipEntry.isDirectory()) { + if (!newFile.isDirectory() && !newFile.mkdirs()) { + throw new IOException("Failed to create directory " + newFile); + } + } else { + + // fix for Windows-created archives + File parent = newFile.getParentFile(); + if (!parent.isDirectory() && !parent.mkdirs()) { + throw new IOException("Failed to create directory " + parent); + } + + // write file content + FileOutputStream fos = new FileOutputStream(newFile); + int len; + while ((len = zis.read(buffer)) > 0) { + fos.write(buffer, 0, len); + } + fos.close(); + + zipEntry = zis.getNextEntry(); + } + } + + zis.closeEntry(); + zis.close(); + } + + + } catch (Exception e) { + result.genericFailure(this, e); + } + } + + public static File newFile(File destinationDir, ZipEntry zipEntry) throws IOException { + File destFile = new File(destinationDir, zipEntry.getName()); + + String destDirPath = destinationDir.getCanonicalPath(); + String destFilePath = destFile.getCanonicalPath(); + + if (!destFilePath.startsWith(destDirPath + File.separator)) { + throw new IOException("Entry is outside of the target dir: " + zipEntry.getName()); + } + + return destFile; + } + + @Override + public boolean equals(Object other) { + return other instanceof UnzipStep; + } + + @Override + public int hashCode() { + return super.hashCode(); + } +} diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/result/ResultBuilder.java b/andy/src/main/java/nl/tudelft/cse1110/andy/result/ResultBuilder.java index 86ebe84c..c9b61b80 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/result/ResultBuilder.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/result/ResultBuilder.java @@ -4,7 +4,6 @@ import nl.tudelft.cse1110.andy.codechecker.engine.CheckType; import nl.tudelft.cse1110.andy.execution.Context.Context; import nl.tudelft.cse1110.andy.execution.ExecutionStep; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import nl.tudelft.cse1110.andy.grade.GradeCalculator; import nl.tudelft.cse1110.andy.grade.GradeValues; import nl.tudelft.cse1110.andy.grade.GradeWeight; @@ -275,8 +274,6 @@ public Result build() { GradeWeight weights = GradeWeight.fromConfig(ctx.getRunConfiguration().weights()); String successMessage = ctx.getRunConfiguration().successMessage(); - this.checkExternalProcessExit(); - final int finalGrade = calculateFinalGrade(grades, weights); final int penalty = grades.getPenalty(); @@ -301,15 +298,6 @@ private void buildGenericFailure() { genericFailureExternalProcessExitCode, genericFailureExternalProcessErrorMessages); } - private void checkExternalProcessExit() { - ExternalProcess process = ctx.getExternalProcess(); - if (!process.hasExitedNormally()) { - this.genericFailureExternalProcessExitCode = process.getExitCode(); - this.genericFailureExternalProcessErrorMessages = process.getErrorMessages(); - this.buildGenericFailure(); - } - } - private double calculateTimeItTookToRun() { long stopTime = System.nanoTime(); long elapsedTime = stopTime - startTime; diff --git a/andy/src/main/java/nl/tudelft/cse1110/andy/utils/FilesUtils.java b/andy/src/main/java/nl/tudelft/cse1110/andy/utils/FilesUtils.java index e8d24eb9..d70c4c5e 100644 --- a/andy/src/main/java/nl/tudelft/cse1110/andy/utils/FilesUtils.java +++ b/andy/src/main/java/nl/tudelft/cse1110/andy/utils/FilesUtils.java @@ -37,7 +37,6 @@ public static Collection getAllJavaFiles(String sourceDir) { return getAllFiles(sourceDir, "java"); } - public static void createDirIfNeeded(String dir) { // inspired by: https://stackoverflow.com/questions/3634853/how-to-create-a-directory-in-java File theDir = new File(dir); diff --git a/andy/src/test/java/integration/ExternalProcessMetaTestsTest.java b/andy/src/test/java/integration/ExternalProcessMetaTestsTest.java deleted file mode 100644 index 3d3dc77c..00000000 --- a/andy/src/test/java/integration/ExternalProcessMetaTestsTest.java +++ /dev/null @@ -1,82 +0,0 @@ -package integration; - -import nl.tudelft.cse1110.andy.execution.mode.Action; -import nl.tudelft.cse1110.andy.result.Result; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; - -import static java.time.Duration.ofSeconds; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively; - - -// Disabled as this test is flaky and this feature is not used in the current version of Andy -// See https://github.com/SERG-Delft/andy/issues/144 -@Disabled -public class ExternalProcessMetaTestsTest extends BaseMetaTestsTest { - - private static final String EXTERNAL_PROCESS_LOCAL_CONNECTION = - "/andy_test_external_process_local_connection"; - private static final String EXTERNAL_PROCESS_LOCAL_CONNECTION_META_TEST_PASS_1 = - "/andy_test_external_process_local_connection_meta_test_pass_1"; - private static final String EXTERNAL_PROCESS_LOCAL_CONNECTION_META_TEST_PASS_2 = - "/andy_test_external_process_local_connection_meta_test_pass_2"; - - private static final String INDEX_FILE_NAME = "/index.html"; - - @BeforeAll - static void copyFiles() throws IOException { - final String tmp = getTempDirectory(); - - createDirectoryAndHtmlFile(tmp, EXTERNAL_PROCESS_LOCAL_CONNECTION, "hello"); - createDirectoryAndHtmlFile(tmp, EXTERNAL_PROCESS_LOCAL_CONNECTION_META_TEST_PASS_1, "bye"); - createDirectoryAndHtmlFile(tmp, EXTERNAL_PROCESS_LOCAL_CONNECTION_META_TEST_PASS_2, "auf wiedersehen"); - } - - private static void createDirectoryAndHtmlFile(String tmp, String directory, String content) throws IOException { - Files.createDirectories(Path.of(tmp + directory)); - Files.writeString(Path.of(tmp + directory + INDEX_FILE_NAME), content); - } - - private static String getTempDirectory() { - return System.getProperty("java.io.tmpdir"); - } - - @AfterAll - static void cleanupFiles() throws IOException { - final String tmp = getTempDirectory(); - deleteDirectoryAndHtmlFile(tmp, EXTERNAL_PROCESS_LOCAL_CONNECTION); - deleteDirectoryAndHtmlFile(tmp, EXTERNAL_PROCESS_LOCAL_CONNECTION_META_TEST_PASS_1); - deleteDirectoryAndHtmlFile(tmp, EXTERNAL_PROCESS_LOCAL_CONNECTION_META_TEST_PASS_2); - } - - private static void deleteDirectoryAndHtmlFile(String tmp, String directory) throws IOException { - Files.deleteIfExists(Path.of(tmp + directory + INDEX_FILE_NAME)); - Files.deleteIfExists(Path.of(tmp + directory)); - } - - @Test - void localConnectionWithMetaTestsTest() { - assertTimeoutPreemptively(ofSeconds(30), () -> { - Result result = run(Action.FULL_WITH_HINTS, "EmptyLibrary", "ExternalProcessLocalConnectionSolution", - "ExternalProcessLocalConnectionWithMetaTestsConfiguration"); - - assertThat(result.hasFailed()).isFalse(); - assertThat(result.hasGenericFailure()).isFalse(); - - assertThat(result.getMetaTests().getPassedMetaTests()).isEqualTo(3); - assertThat(result.getMetaTests().getTotalTests()).isEqualTo(5); - - assertThat(result.getMetaTests()) - .has(passedMetaTest("example of a passing meta test")) - .has(passedMetaTest("example of another passing meta test")) - .has(failedMetaTest("example of a failing meta test")); - }); - } -} diff --git a/andy/src/test/java/integration/ExternalProcessTest.java b/andy/src/test/java/integration/ExternalProcessTest.java deleted file mode 100644 index 76de551b..00000000 --- a/andy/src/test/java/integration/ExternalProcessTest.java +++ /dev/null @@ -1,135 +0,0 @@ -package integration; - -import nl.tudelft.cse1110.andy.execution.mode.Action; -import nl.tudelft.cse1110.andy.result.Result; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.EnabledOnOs; -import org.junit.jupiter.api.condition.OS; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; - -import static java.time.Duration.ofSeconds; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively; - -@EnabledOnOs({OS.LINUX, OS.MAC}) -public class ExternalProcessTest extends IntegrationTestBase { - - private static final String INIT_SIGNAL_SHELL_SCRIPT_PATH = "/andy_test_external_process_init_signal.sh"; - private static final String GRACEFUL_EXIT_SHELL_SCRIPT_PATH = "/andy_test_external_process_graceful_exit.sh"; - private static final String EXTERNAL_PROCESS_ERROR = "/andy_test_external_process_error.sh"; - private static final String EXTERNAL_PROCESS_CRASHES = "/andy_test_external_process_crashes.sh"; - private static final String EXTERNAL_PROCESS_LOCAL_CONNECTION = "/andy_test_external_process_local_connection.sh"; - - private static final String INIT_SIGNAL_GENERATED_FILE_PATH = "/andy_test_external_process_init_signal_generated"; - private static final String INIT_SIGNAL_GENERATED_FILE_PATH_2 = "/andy_test_external_process_init_signal_generated_2"; - private static final String GRACEFUL_EXIT_GENERATED_FILE_PATH = "/andy_test_external_process_graceful_exit_generated"; - - @BeforeAll - static void copyShellScripts() throws IOException { - String tmp = getTempDirectory(); - - Files.writeString(Path.of(tmp + INIT_SIGNAL_SHELL_SCRIPT_PATH), String.format(""" - echo "hello" > %s - echo "initSignal" - sleep 30 - echo "should be killed before this line is executed" > %s - """, - tmp + INIT_SIGNAL_GENERATED_FILE_PATH, - tmp + INIT_SIGNAL_GENERATED_FILE_PATH_2)); - - Files.writeString(Path.of(tmp + GRACEFUL_EXIT_SHELL_SCRIPT_PATH), String.format(""" - echo "hello" > %s - """, tmp + GRACEFUL_EXIT_GENERATED_FILE_PATH)); - - Files.writeString(Path.of(tmp + EXTERNAL_PROCESS_ERROR), """ - echo "some error" 1>&2 - echo "initSignal" - sleep 30 - """); - - Files.writeString(Path.of(tmp + EXTERNAL_PROCESS_CRASHES), """ - echo "some error" 1>&2 - exit 1 - """); - - Files.writeString(Path.of(tmp + EXTERNAL_PROCESS_LOCAL_CONNECTION), """ - while true; do echo "HTTP/1.1 200 OK\\nContent-Length: 5\\n\\nhello" | nc -l 8086; done - """); - } - - @AfterAll - static void shellCleanup() throws IOException { - String tmp = getTempDirectory(); - Files.deleteIfExists(Path.of(tmp + INIT_SIGNAL_SHELL_SCRIPT_PATH)); - Files.deleteIfExists(Path.of(tmp + GRACEFUL_EXIT_SHELL_SCRIPT_PATH)); - Files.deleteIfExists(Path.of(tmp + EXTERNAL_PROCESS_ERROR)); - Files.deleteIfExists(Path.of(tmp + EXTERNAL_PROCESS_CRASHES)); - Files.deleteIfExists(Path.of(tmp + EXTERNAL_PROCESS_LOCAL_CONNECTION)); - - Files.deleteIfExists(Path.of(tmp + INIT_SIGNAL_GENERATED_FILE_PATH)); - Files.deleteIfExists(Path.of(tmp + INIT_SIGNAL_GENERATED_FILE_PATH_2)); - Files.deleteIfExists(Path.of(tmp + GRACEFUL_EXIT_GENERATED_FILE_PATH)); - } - - private static String getTempDirectory() { - return System.getProperty("java.io.tmpdir"); - } - - @Test - void externalProcessGracefulExit() { - Result result = run("EmptyLibrary", "EmptySolution", - "ExternalProcessGracefulExitConfiguration"); - - assertThat(result.hasGenericFailure()).isFalse(); - - String tmp = getTempDirectory(); - assertThat(new File(tmp + GRACEFUL_EXIT_GENERATED_FILE_PATH)).exists(); - } - - @Test - void externalProcessInitSignal() { - assertTimeoutPreemptively(ofSeconds(10), () -> { - - Result result = run("EmptyLibrary", "EmptySolution", - "ExternalProcessInitSignalConfiguration"); - - assertThat(result.hasGenericFailure()).isFalse(); - - String tmp = getTempDirectory(); - assertThat(new File(tmp + INIT_SIGNAL_GENERATED_FILE_PATH)).exists(); - assertThat(new File(tmp + INIT_SIGNAL_GENERATED_FILE_PATH_2)).doesNotExist(); - - }); - } - - @Test - void externalProcessError() { - assertTimeoutPreemptively(ofSeconds(10), () -> { - - Result result = run("EmptyLibrary", "EmptySolution", - "ExternalProcessErrorConfiguration"); - - assertThat(result.hasGenericFailure()).isFalse(); - - }); - } - - @Test - void externalProcessCrashes() { - Result result = run("EmptyLibrary", "EmptySolution", - "ExternalProcessCrashesConfiguration"); - - assertThat(result.getGenericFailure().getExternalProcessExitCode()) - .isPresent() - .hasValue(1); - assertThat(result.getGenericFailure().getExternalProcessErrorMessages()) - .isPresent() - .hasValue("some error"); - } -} diff --git a/andy/src/test/java/integration/IntegrationTestBase.java b/andy/src/test/java/integration/IntegrationTestBase.java index 64ad5c79..b0132c3b 100644 --- a/andy/src/test/java/integration/IntegrationTestBase.java +++ b/andy/src/test/java/integration/IntegrationTestBase.java @@ -16,6 +16,7 @@ import java.io.File; import java.io.IOException; +import java.util.ArrayList; import java.util.List; import static nl.tudelft.cse1110.andy.utils.ResourceUtils.resourceFolder; @@ -32,6 +33,12 @@ public void cleanup() throws IOException { FileUtils.deleteDirectory(reportDir); } + public void addZippedFiles(List files) { + if(files != null){ + this.ctx.getRunConfiguration().setZippedFiles(files); + } + } + public Result run(Action action, String libraryFile, String solutionFile, diff --git a/andy/src/test/java/integration/UnzipTest.java b/andy/src/test/java/integration/UnzipTest.java new file mode 100644 index 00000000..4b1b26c7 --- /dev/null +++ b/andy/src/test/java/integration/UnzipTest.java @@ -0,0 +1,19 @@ +package integration; + +import nl.tudelft.cse1110.andy.execution.mode.Action; +import nl.tudelft.cse1110.andy.result.Result; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; + +public class UnzipTest extends IntegrationTestBase{ + + @Test + public void unzipCorrectlyWithinWorkDir() { + // todo: add test code for unzipStep + } + + } diff --git a/andy/src/test/java/unit/execution/Context/ContextDirectorTest.java b/andy/src/test/java/unit/execution/Context/ContextDirectorTest.java index 04475a4d..6cb38230 100644 --- a/andy/src/test/java/unit/execution/Context/ContextDirectorTest.java +++ b/andy/src/test/java/unit/execution/Context/ContextDirectorTest.java @@ -80,8 +80,8 @@ private static boolean isBaseContext(Context context) { && context.getAction().equals(action) && context.getDirectoryConfiguration().getWorkingDir().equals(directoryConfiguration.getWorkingDir()) && context.getDirectoryConfiguration().getOutputDir().equals(directoryConfiguration.getOutputDir()) - && context.getCleanClassloader() != null - && context.getExternalProcess() != null; + && context.getCleanClassloader() != null; + } private static boolean restIsNull(Context context) { diff --git a/andy/src/test/java/unit/execution/metatest/ExternalProcessMetaTestTest.java b/andy/src/test/java/unit/execution/metatest/ExternalProcessMetaTestTest.java deleted file mode 100644 index 70389c6f..00000000 --- a/andy/src/test/java/unit/execution/metatest/ExternalProcessMetaTestTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package unit.execution.metatest; - -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; -import nl.tudelft.cse1110.andy.execution.metatest.externalprocess.ExternalProcessMetaTest; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.mockito.InOrder; - -import java.io.IOException; - -import static org.mockito.Mockito.*; - -public class ExternalProcessMetaTestTest { - - private ExternalProcess mockExternalProcess; - private ExternalProcessMetaTest externalProcessMetaTest; - - @BeforeEach - public void setup() { - this.mockExternalProcess = mock(ExternalProcess.class); - this.externalProcessMetaTest = new ExternalProcessMetaTest(1, "test", this.mockExternalProcess); - } - - @AfterEach - public void assertNoMoreExternalProcessInteractions() { - verifyNoMoreInteractions(this.mockExternalProcess); - } - - @Test - public void startExternalProcessTest() throws IOException { - // Act - this.externalProcessMetaTest.startExternalProcess(); - - // Assert - InOrder order = inOrder(mockExternalProcess); - order.verify(this.mockExternalProcess).launch(); - order.verify(this.mockExternalProcess).awaitInitialization(); - } - - @Test - public void killExternalProcessTest() { - // Act - this.externalProcessMetaTest.killExternalProcess(); - - // Assert - verify(this.mockExternalProcess).kill(); - } -} diff --git a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessCrashesConfiguration.java b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessCrashesConfiguration.java index b0a53189..5c257a5c 100644 --- a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessCrashesConfiguration.java +++ b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessCrashesConfiguration.java @@ -1,8 +1,6 @@ package delft; import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List; diff --git a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessErrorConfiguration.java b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessErrorConfiguration.java index 8f12203f..2badbe1c 100644 --- a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessErrorConfiguration.java +++ b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessErrorConfiguration.java @@ -1,8 +1,6 @@ package delft; import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List; diff --git a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessGracefulExitConfiguration.java b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessGracefulExitConfiguration.java index ac4c0113..505cce7a 100644 --- a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessGracefulExitConfiguration.java +++ b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessGracefulExitConfiguration.java @@ -1,8 +1,6 @@ package delft; import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List; diff --git a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessInitSignalConfiguration.java b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessInitSignalConfiguration.java index 800ac78c..32fb1b6f 100644 --- a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessInitSignalConfiguration.java +++ b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessInitSignalConfiguration.java @@ -1,8 +1,6 @@ package delft; import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List; diff --git a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessLocalConnectionConfiguration.java b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessLocalConnectionConfiguration.java index 397ebff9..0cb58efd 100644 --- a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessLocalConnectionConfiguration.java +++ b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessLocalConnectionConfiguration.java @@ -1,8 +1,6 @@ package delft; import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List; diff --git a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessLocalConnectionWithMetaTestsConfiguration.java b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessLocalConnectionWithMetaTestsConfiguration.java index de145489..6c457434 100644 --- a/andy/src/test/resources/grader/fixtures/Config/ExternalProcessLocalConnectionWithMetaTestsConfiguration.java +++ b/andy/src/test/resources/grader/fixtures/Config/ExternalProcessLocalConnectionWithMetaTestsConfiguration.java @@ -2,8 +2,6 @@ import nl.tudelft.cse1110.andy.config.MetaTest; import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List; diff --git a/andy/src/test/resources/grader/fixtures/Config/SeleniumSimpleWebpageConfiguration.java b/andy/src/test/resources/grader/fixtures/Config/SeleniumSimpleWebpageConfiguration.java index 77d2f2fc..f8dd29e0 100644 --- a/andy/src/test/resources/grader/fixtures/Config/SeleniumSimpleWebpageConfiguration.java +++ b/andy/src/test/resources/grader/fixtures/Config/SeleniumSimpleWebpageConfiguration.java @@ -1,8 +1,6 @@ package delft; import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List; diff --git a/assignments/selenium-testing/franksBookstore-addAuthor/config/Configuration.java b/assignments/selenium-testing/franksBookstore-addAuthor/config/Configuration.java index 9d2b02d1..75235f91 100644 --- a/assignments/selenium-testing/franksBookstore-addAuthor/config/Configuration.java +++ b/assignments/selenium-testing/franksBookstore-addAuthor/config/Configuration.java @@ -2,8 +2,6 @@ import nl.tudelft.cse1110.andy.config.MetaTest; import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List; diff --git a/assignments/selenium-testing/franksBookstore-addBook/config/Configuration.java b/assignments/selenium-testing/franksBookstore-addBook/config/Configuration.java index 6d3bb1a2..8c8e25a5 100644 --- a/assignments/selenium-testing/franksBookstore-addBook/config/Configuration.java +++ b/assignments/selenium-testing/franksBookstore-addBook/config/Configuration.java @@ -2,8 +2,6 @@ import nl.tudelft.cse1110.andy.config.MetaTest; import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List; diff --git a/assignments/selenium-testing/franksBookstore-search/config/Configuration.java b/assignments/selenium-testing/franksBookstore-search/config/Configuration.java index f9c15404..9a1d2301 100644 --- a/assignments/selenium-testing/franksBookstore-search/config/Configuration.java +++ b/assignments/selenium-testing/franksBookstore-search/config/Configuration.java @@ -2,8 +2,6 @@ import nl.tudelft.cse1110.andy.config.MetaTest; import nl.tudelft.cse1110.andy.config.RunConfiguration; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List; diff --git a/assignments/selenium-testing/mauricio-airways/config/Configuration.java b/assignments/selenium-testing/mauricio-airways/config/Configuration.java index 1c6cf07d..d56ea5d3 100644 --- a/assignments/selenium-testing/mauricio-airways/config/Configuration.java +++ b/assignments/selenium-testing/mauricio-airways/config/Configuration.java @@ -3,8 +3,6 @@ import nl.tudelft.cse1110.andy.config.MetaTest; import nl.tudelft.cse1110.andy.config.RunConfiguration; import nl.tudelft.cse1110.andy.execution.mode.Mode; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List; diff --git a/assignments/selenium-testing/todays-events/config/Configuration.java b/assignments/selenium-testing/todays-events/config/Configuration.java index bfba2dec..04102bda 100644 --- a/assignments/selenium-testing/todays-events/config/Configuration.java +++ b/assignments/selenium-testing/todays-events/config/Configuration.java @@ -3,8 +3,6 @@ import nl.tudelft.cse1110.andy.config.MetaTest; import nl.tudelft.cse1110.andy.config.RunConfiguration; import nl.tudelft.cse1110.andy.execution.mode.Mode; -import nl.tudelft.cse1110.andy.execution.externalprocess.CommandExternalProcess; -import nl.tudelft.cse1110.andy.execution.externalprocess.ExternalProcess; import java.util.HashMap; import java.util.List;