Skip to content

Commit

Permalink
no need to run emission analysis with integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 committed Sep 9, 2024
1 parent eb7eb65 commit 3f7c8d2
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/test/java/org/matsim/run/RunIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.matsim.simwrapper.SimWrapperConfigGroup;
import org.matsim.testcases.MatsimTestUtils;

import java.io.File;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
Expand All @@ -51,7 +52,11 @@ void runScenario() {
"--iterations", "1",
"--config:plans.inputPlansFile", "https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v1.1/lausitz-v1.1-1pct.plans-initial.xml.gz",
"--output", utils.getOutputDirectory(),
"--config:controller.overwriteFiles=deleteDirectoryIfExists") == 0 : "Must return non error code";
"--config:controller.overwriteFiles=deleteDirectoryIfExists", "--emissions", "DO_NOT_PERFORM_EMISSIONS_ANALYSIS")
== 0 : "Must return non error code";

Assertions.assertTrue(new File(utils.getOutputDirectory()).isDirectory());
Assertions.assertTrue(new File(utils.getOutputDirectory()).exists());
}

@Test
Expand All @@ -64,8 +69,11 @@ void runScenarioIncludingDrt() {
"--iterations", "1",
"--config:plans.inputPlansFile", "https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/lausitz/input/v1.1/lausitz-v1.1-1pct.plans-initial.xml.gz",
"--output", utils.getOutputDirectory(),
"--config:controller.overwriteFiles=deleteDirectoryIfExists") == 0 : "Must return non error code";
"--config:controller.overwriteFiles=deleteDirectoryIfExists", "--emissions", "DO_NOT_PERFORM_EMISSIONS_ANALYSIS")
== 0 : "Must return non error code";

Assertions.assertTrue(new File(utils.getOutputDirectory()).isDirectory());
Assertions.assertTrue(new File(utils.getOutputDirectory()).exists());
}

@Test
Expand Down Expand Up @@ -109,7 +117,11 @@ void runScenarioIncludingAdditionalPtLine() {
"--iterations", "1",
"--output", utils.getOutputDirectory(),
"--config:plans.inputPlansFile", inputPath.toString(),
"--config:controller.overwriteFiles=deleteDirectoryIfExists") == 0 : "Must return non error code";
"--config:controller.overwriteFiles=deleteDirectoryIfExists", "--emissions", "DO_NOT_PERFORM_EMISSIONS_ANALYSIS")
== 0 : "Must return non error code";

Assertions.assertTrue(new File(utils.getOutputDirectory()).isDirectory());
Assertions.assertTrue(new File(utils.getOutputDirectory()).exists());

Scenario scenario = ScenarioUtils.createScenario(ConfigUtils.createConfig());

Expand Down

0 comments on commit 3f7c8d2

Please sign in to comment.