Committed by
Gerrit Code Review
FIxing a few glitches in STC and scenarios.
Change-Id: I55379c53392ad94e5c5d41b6ceb77d2382fa0d29
Showing
5 changed files
with
11 additions
and
11 deletions
... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
23 | exec="onos-check-apps ${OC1} drivers,openflow,proxyarp,fwd"/> | 23 | exec="onos-check-apps ${OC1} drivers,openflow,proxyarp,fwd"/> |
24 | 24 | ||
25 | <step name="Ping-All-And-Verify" requires="Check-Apps" | 25 | <step name="Ping-All-And-Verify" requires="Check-Apps" |
26 | - exec="onos-mininet sendAndExpect py net.pingAll(1) --expect Results: .% dropped"/> | 26 | + exec="onos-mininet sendAndExpect py net.pingAll(1) --expect 600/600 received"/> |
27 | 27 | ||
28 | <step name="Check-Summary-For-Hosts" requires="~Ping-All-And-Verify" | 28 | <step name="Check-Summary-For-Hosts" requires="~Ping-All-And-Verify" |
29 | exec="onos-check-summary ${OC1} [0-9]* 25 140 25"/> | 29 | exec="onos-check-summary ${OC1} [0-9]* 25 140 25"/> | ... | ... |
... | @@ -34,14 +34,13 @@ | ... | @@ -34,14 +34,13 @@ |
34 | <step name="Check-Summary" requires="Wait-For-Mininet" | 34 | <step name="Check-Summary" requires="Wait-For-Mininet" |
35 | exec="onos-check-summary ${OC1} [0-9]* 25 140 0"/> | 35 | exec="onos-check-summary ${OC1} [0-9]* 25 140 0"/> |
36 | 36 | ||
37 | - <step name="Balance-Masters" requires="Check-Summary" | 37 | + <step name="Balance-Masters" requires="~Check-Summary" if="${OC2}" |
38 | exec="onos ${OC1} balance-masters"/> | 38 | exec="onos ${OC1} balance-masters"/> |
39 | 39 | ||
40 | - <step name="Pause-For-Masters" requires="Balance-Masters" | 40 | + <step name="Pause-For-Masters" requires="Balance-Masters" if="${OC2}" |
41 | exec="sleep 10"/> | 41 | exec="sleep 10"/> |
42 | 42 | ||
43 | - <step name="Check-Flows" requires="~Pause-For-Masters" | 43 | + <step name="Check-Flows" requires="~Pause-For-Masters,~Check-Summary" |
44 | exec="onos-check-flows ${OC1}"/> | 44 | exec="onos-check-flows ${OC1}"/> |
45 | - | ||
46 | </group> | 45 | </group> |
47 | </scenario> | 46 | </scenario> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -157,7 +157,7 @@ class ScenarioStore { | ... | @@ -157,7 +157,7 @@ class ScenarioStore { |
157 | cfg.getKeys().forEachRemaining(prop -> add(StepEvent.fromString(cfg.getString(prop)))); | 157 | cfg.getKeys().forEachRemaining(prop -> add(StepEvent.fromString(cfg.getString(prop)))); |
158 | cfg.save(); | 158 | cfg.save(); |
159 | } catch (ConfigurationException e) { | 159 | } catch (ConfigurationException e) { |
160 | - print("Unable to store file %s", storeFile); | 160 | + print("Unable to load file %s", storeFile); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ... | ... |
... | @@ -50,8 +50,8 @@ public class StepEvent { | ... | @@ -50,8 +50,8 @@ public class StepEvent { |
50 | /** | 50 | /** |
51 | * Creates a new step record for non-running status. | 51 | * Creates a new step record for non-running status. |
52 | * | 52 | * |
53 | - * @param name test step or group name | 53 | + * @param name test step or group name |
54 | - * @param status status | 54 | + * @param status status |
55 | * @param command step command | 55 | * @param command step command |
56 | */ | 56 | */ |
57 | public StepEvent(String name, Status status, String command) { | 57 | public StepEvent(String name, Status status, String command) { |
... | @@ -108,7 +108,9 @@ public class StepEvent { | ... | @@ -108,7 +108,9 @@ public class StepEvent { |
108 | */ | 108 | */ |
109 | public static StepEvent fromString(String string) { | 109 | public static StepEvent fromString(String string) { |
110 | String[] fields = string.split("~"); | 110 | String[] fields = string.split("~"); |
111 | - return new StepEvent(fields[0], parseLong(fields[1]), valueOf(fields[2]), | 111 | + return fields.length == 4 ? |
112 | - fields[3].equals("null") ? null : fields[3]); | 112 | + new StepEvent(fields[0], parseLong(fields[1]), valueOf(fields[2]), |
113 | + fields[3].equals("null") ? null : fields[3]) : | ||
114 | + new StepEvent(fields[0], 0, Status.WAITING, null); | ||
113 | } | 115 | } |
114 | } | 116 | } | ... | ... |
... | @@ -74,7 +74,6 @@ class StepProcessor implements Runnable { | ... | @@ -74,7 +74,6 @@ class StepProcessor implements Runnable { |
74 | */ | 74 | */ |
75 | private int execute() { | 75 | private int execute() { |
76 | try (PrintWriter pw = new PrintWriter(logFile())) { | 76 | try (PrintWriter pw = new PrintWriter(logFile())) { |
77 | - System.out.println("cmd: [" + command() + "]"); | ||
78 | process = Runtime.getRuntime().exec(command()); | 77 | process = Runtime.getRuntime().exec(command()); |
79 | processOutput(pw); | 78 | processOutput(pw); |
80 | 79 | ... | ... |
-
Please register or login to post a comment