Thomas Vachuska
Committed by Gerrit Code Review

Fixed STC defect where a dependency would bring out an otherwise inactive step.

Change-Id: I7963a6896d5a1d6bc4e369627b11b7c8690c1343
...@@ -7,6 +7,8 @@ VER=1.3.0-SNAPSHOT ...@@ -7,6 +7,8 @@ VER=1.3.0-SNAPSHOT
7 JAR=~/.m2/repository/org/onosproject/onlab-stc/$VER/onlab-stc-$VER.jar 7 JAR=~/.m2/repository/org/onosproject/onlab-stc/$VER/onlab-stc-$VER.jar
8 SCENARIOS=$ONOS_ROOT/tools/test/scenarios 8 SCENARIOS=$ONOS_ROOT/tools/test/scenarios
9 9
10 +DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=y"
11 +
10 scenario=${1:-smoke} 12 scenario=${1:-smoke}
11 13
12 [ ! -f $scenario ] && scenario=$SCENARIOS/$scenario 14 [ ! -f $scenario ] && scenario=$SCENARIOS/$scenario
......
...@@ -309,7 +309,9 @@ public class Compiler { ...@@ -309,7 +309,9 @@ public class Compiler {
309 309
310 print("dependency name=%s requires=%s", name, requires); 310 print("dependency name=%s requires=%s", name, requires);
311 Step step = getStep(name, namespace); 311 Step step = getStep(name, namespace);
312 - processRequirements(step, requires, namespace); 312 + if (!inactiveSteps.containsValue(step)) {
313 + processRequirements(step, requires, namespace);
314 + }
313 } 315 }
314 316
315 /** 317 /**
......
...@@ -69,8 +69,8 @@ public class CompilerTest { ...@@ -69,8 +69,8 @@ public class CompilerTest {
69 ProcessFlow flow = compiler.processFlow(); 69 ProcessFlow flow = compiler.processFlow();
70 70
71 assertSame("incorrect scenario", scenario, compiler.scenario()); 71 assertSame("incorrect scenario", scenario, compiler.scenario());
72 - assertEquals("incorrect step count", 25, flow.getVertexes().size()); 72 + assertEquals("incorrect step count", 24, flow.getVertexes().size());
73 - assertEquals("incorrect dependency count", 21, flow.getEdges().size()); 73 + assertEquals("incorrect dependency count", 17, flow.getEdges().size());
74 assertEquals("incorrect logDir", 74 assertEquals("incorrect logDir",
75 TEST_DIR.getAbsolutePath() + "/foo", compiler.logDir().getPath()); 75 TEST_DIR.getAbsolutePath() + "/foo", compiler.logDir().getPath());
76 76
......