Fixed STC defect where a dependency would bring out an otherwise inactive step.
Change-Id: I7963a6896d5a1d6bc4e369627b11b7c8690c1343
diff --git a/tools/test/bin/stc b/tools/test/bin/stc
index c4c0d43..120d7fd 100755
--- a/tools/test/bin/stc
+++ b/tools/test/bin/stc
@@ -7,6 +7,8 @@
JAR=~/.m2/repository/org/onosproject/onlab-stc/$VER/onlab-stc-$VER.jar
SCENARIOS=$ONOS_ROOT/tools/test/scenarios
+DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=y"
+
scenario=${1:-smoke}
[ ! -f $scenario ] && scenario=$SCENARIOS/$scenario
diff --git a/utils/stc/src/main/java/org/onlab/stc/Compiler.java b/utils/stc/src/main/java/org/onlab/stc/Compiler.java
index 2a8a2ce..4d68962 100644
--- a/utils/stc/src/main/java/org/onlab/stc/Compiler.java
+++ b/utils/stc/src/main/java/org/onlab/stc/Compiler.java
@@ -309,7 +309,9 @@
print("dependency name=%s requires=%s", name, requires);
Step step = getStep(name, namespace);
- processRequirements(step, requires, namespace);
+ if (!inactiveSteps.containsValue(step)) {
+ processRequirements(step, requires, namespace);
+ }
}
/**
diff --git a/utils/stc/src/test/java/org/onlab/stc/CompilerTest.java b/utils/stc/src/test/java/org/onlab/stc/CompilerTest.java
index 7963d1f..35b200b 100644
--- a/utils/stc/src/test/java/org/onlab/stc/CompilerTest.java
+++ b/utils/stc/src/test/java/org/onlab/stc/CompilerTest.java
@@ -69,8 +69,8 @@
ProcessFlow flow = compiler.processFlow();
assertSame("incorrect scenario", scenario, compiler.scenario());
- assertEquals("incorrect step count", 25, flow.getVertexes().size());
- assertEquals("incorrect dependency count", 21, flow.getEdges().size());
+ assertEquals("incorrect step count", 24, flow.getVertexes().size());
+ assertEquals("incorrect dependency count", 17, flow.getEdges().size());
assertEquals("incorrect logDir",
TEST_DIR.getAbsolutePath() + "/foo", compiler.logDir().getPath());