FIxing a few glitches in STC and scenarios.

Change-Id: I55379c53392ad94e5c5d41b6ceb77d2382fa0d29
diff --git a/tools/test/scenarios/net-pingall.xml b/tools/test/scenarios/net-pingall.xml
index 41d7354..babdfa6 100644
--- a/tools/test/scenarios/net-pingall.xml
+++ b/tools/test/scenarios/net-pingall.xml
@@ -23,7 +23,7 @@
               exec="onos-check-apps ${OC1} drivers,openflow,proxyarp,fwd"/>
 
         <step name="Ping-All-And-Verify" requires="Check-Apps"
-              exec="onos-mininet sendAndExpect py net.pingAll(1) --expect Results: .% dropped"/>
+              exec="onos-mininet sendAndExpect py net.pingAll(1) --expect 600/600 received"/>
 
         <step name="Check-Summary-For-Hosts" requires="~Ping-All-And-Verify"
               exec="onos-check-summary ${OC1} [0-9]* 25 140 25"/>
diff --git a/tools/test/scenarios/net-setup.xml b/tools/test/scenarios/net-setup.xml
index abfd84c..5b71dfe 100644
--- a/tools/test/scenarios/net-setup.xml
+++ b/tools/test/scenarios/net-setup.xml
@@ -34,14 +34,13 @@
         <step name="Check-Summary" requires="Wait-For-Mininet"
               exec="onos-check-summary ${OC1} [0-9]* 25 140 0"/>
 
-        <step name="Balance-Masters" requires="Check-Summary"
+        <step name="Balance-Masters" requires="~Check-Summary" if="${OC2}"
               exec="onos ${OC1} balance-masters"/>
 
-        <step name="Pause-For-Masters" requires="Balance-Masters"
+        <step name="Pause-For-Masters" requires="Balance-Masters" if="${OC2}"
               exec="sleep 10"/>
 
-        <step name="Check-Flows" requires="~Pause-For-Masters"
+        <step name="Check-Flows" requires="~Pause-For-Masters,~Check-Summary"
               exec="onos-check-flows ${OC1}"/>
-
     </group>
 </scenario>
\ No newline at end of file
diff --git a/utils/stc/src/main/java/org/onlab/stc/ScenarioStore.java b/utils/stc/src/main/java/org/onlab/stc/ScenarioStore.java
index d7b8e18..80fa4f4 100644
--- a/utils/stc/src/main/java/org/onlab/stc/ScenarioStore.java
+++ b/utils/stc/src/main/java/org/onlab/stc/ScenarioStore.java
@@ -157,7 +157,7 @@
             cfg.getKeys().forEachRemaining(prop -> add(StepEvent.fromString(cfg.getString(prop))));
             cfg.save();
         } catch (ConfigurationException e) {
-            print("Unable to store file %s", storeFile);
+            print("Unable to load file %s", storeFile);
         }
     }
 
diff --git a/utils/stc/src/main/java/org/onlab/stc/StepEvent.java b/utils/stc/src/main/java/org/onlab/stc/StepEvent.java
index 93120fe..c9b81a2 100644
--- a/utils/stc/src/main/java/org/onlab/stc/StepEvent.java
+++ b/utils/stc/src/main/java/org/onlab/stc/StepEvent.java
@@ -50,8 +50,8 @@
     /**
      * Creates a new step record for non-running status.
      *
-     * @param name   test step or group name
-     * @param status status
+     * @param name    test step or group name
+     * @param status  status
      * @param command step command
      */
     public StepEvent(String name, Status status, String command) {
@@ -108,7 +108,9 @@
      */
     public static StepEvent fromString(String string) {
         String[] fields = string.split("~");
-        return new StepEvent(fields[0], parseLong(fields[1]), valueOf(fields[2]),
-                             fields[3].equals("null") ? null : fields[3]);
+        return fields.length == 4 ?
+                new StepEvent(fields[0], parseLong(fields[1]), valueOf(fields[2]),
+                              fields[3].equals("null") ? null : fields[3]) :
+                new StepEvent(fields[0], 0, Status.WAITING, null);
     }
 }
diff --git a/utils/stc/src/main/java/org/onlab/stc/StepProcessor.java b/utils/stc/src/main/java/org/onlab/stc/StepProcessor.java
index b369c93..86315e9 100644
--- a/utils/stc/src/main/java/org/onlab/stc/StepProcessor.java
+++ b/utils/stc/src/main/java/org/onlab/stc/StepProcessor.java
@@ -74,7 +74,6 @@
      */
     private int execute() {
         try (PrintWriter pw = new PrintWriter(logFile())) {
-            System.out.println("cmd: [" + command() + "]");
             process = Runtime.getRuntime().exec(command());
             processOutput(pw);