Skip to content

Commit

Permalink
Bugfix: Set outputs of test to target folder (remove from resources) (#…
Browse files Browse the repository at this point in the history
…342)

* Set outputs of test to target folder (remove from resources)

* Fix build

* More bugfixes

* different output dirs
  • Loading branch information
dfuchss authored Feb 8, 2024
1 parent 37ca428 commit 166b536
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Licensed under MIT 2023. */
/* Licensed under MIT 2023-2024. */
package edu.kit.kastel.mcse.ardoco.core.execution;

import java.io.File;
Expand All @@ -8,6 +8,7 @@

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
Expand All @@ -21,10 +22,15 @@ public class RunnerBaseTest {
protected static final String INPUT_TEXT = "../pipeline-core/src/test/resources/teastore.txt";
protected static final String INPUT_MODEL_ARCHITECTURE = "../pipeline-core/src/test/resources/teastore.repository";
protected static final String INPUT_MODEL_ARCHITECTURE_UML = "../pipeline-core/src/test/resources/teastore.uml";
protected static final String OUTPUT_DIR = "../pipeline-core/src/test/resources/testout";
protected final String OUTPUT_DIR = "../target/testout-" + this.getClass().getSimpleName();
protected static final String ADDITIONAL_CONFIGS = "../pipeline-core/src/test/resources/additionalConfig.txt";
protected static final String PROJECT_NAME = "teastore";

@BeforeEach
void setupDirectories() {
new File(OUTPUT_DIR).mkdirs();
}

@AfterEach
void cleanUp() {
for (File file : Objects.requireNonNull(new File(OUTPUT_DIR).listFiles())) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Licensed under MIT 2023. */
/* Licensed under MIT 2023-2024. */
package edu.kit.kastel.mcse.ardoco.core.diagramconsistency.evaluation;

import static org.junit.jupiter.api.Assertions.*;
Expand Down Expand Up @@ -51,8 +51,8 @@ public class EvaluationTestBase {
protected static final double PARTIAL_SELECTION_MAX = 0.25;
protected static final double REFACTORING_RATIO = 0.25;

protected static final String PIPELINE_OUTPUT = "src/test/resources/pipeline_out";
protected static final String TEST_OUTPUT = "src/test/resources/test_out";
protected static final String PIPELINE_OUTPUT = "target/pipeline_out";
protected static final String TEST_OUTPUT = "target/test_out";
protected static final Logger logger = LoggerFactory.getLogger(EvaluationTestBase.class);

protected FileWriter writer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Licensed under MIT 2021-2023. */
/* Licensed under MIT 2021-2024. */
package edu.kit.kastel.mcse.ardoco.core.tests.integration;

import java.io.IOException;
Expand Down Expand Up @@ -58,7 +58,7 @@
class InconsistencyDetectionEvaluationIT {
private static final Logger logger = LoggerFactory.getLogger(InconsistencyDetectionEvaluationIT.class);

private static final String OUTPUT = "src/test/resources/testout";
private static final String OUTPUT = "target/testout";
public static final String DIRECTORY_NAME = "ardoco_eval_id";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Licensed under MIT 2022-2023. */
/* Licensed under MIT 2022-2024. */
package edu.kit.kastel.mcse.ardoco.core.tests.integration.statehelper;

import java.io.File;
Expand Down Expand Up @@ -34,7 +34,7 @@ public class ChangedStatesTest {
private static final boolean OVERWRITE_PREVIOUS = false;
private static final Logger logger = LoggerFactory.getLogger(ChangedStatesTest.class);

private static final String OUTPUT = "src/test/resources/testout";
private static final String OUTPUT = "target/testout";
private static final Path OUTPUT_PATH = Path.of(OUTPUT);
private static final Map<Project, ArDoCoResult> DATA_MAP = new LinkedHashMap<>();
private static final String LOGGING_ARDOCO_CORE = "org.slf4j.simpleLogger.log.edu.kit.kastel.mcse.ardoco.core";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Licensed under MIT 2023. */
/* Licensed under MIT 2023-2024. */
package edu.kit.kastel.mcse.ardoco.core.tests.integration;

import static edu.kit.kastel.mcse.ardoco.core.tests.eval.ProjectHelper.ANALYZE_CODE_DIRECTLY;
Expand Down Expand Up @@ -57,7 +57,7 @@ class TraceLinkEvaluationIT {

protected static final Logger logger = LoggerFactory.getLogger(TraceLinkEvaluationIT.class);

protected static final String OUTPUT = "src/test/resources/testout";
protected static final String OUTPUT = "target/testout-tlr-it";

protected static final String LOGGING_ARDOCO_CORE = "org.slf4j.simpleLogger.log.edu.kit.kastel.mcse.ardoco.core";
protected static AtomicBoolean analyzeCodeDirectly = ANALYZE_CODE_DIRECTLY;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Licensed under MIT 2023. */
/* Licensed under MIT 2023-2024. */
package edu.kit.kastel.mcse.ardoco.core.tests.integration;

import static edu.kit.kastel.mcse.ardoco.core.tests.eval.ProjectHelper.ANALYZE_CODE_DIRECTLY;
Expand Down Expand Up @@ -42,7 +42,7 @@
class TraceLinkEvaluationSadCodeDirectIT {
protected static final Logger logger = LoggerFactory.getLogger(TraceLinkEvaluationIT.class);

protected static final String OUTPUT = "src/test/resources/testout";
protected static final String OUTPUT = "target/testout";

protected static final String LOGGING_ARDOCO_CORE = "org.slf4j.simpleLogger.log.edu.kit.kastel.mcse.ardoco.core";

Expand Down

0 comments on commit 166b536

Please sign in to comment.