Adding more patience to onos-check-summary and changing sequencing of smoke.xml scenario.
Change-Id: I1db9084524daa8c5494d0066be30d801e78d0fc3
Showing
3 changed files
with
108 additions
and
102 deletions
... | @@ -6,15 +6,22 @@ | ... | @@ -6,15 +6,22 @@ |
6 | aux=/tmp/stc-$$.log | 6 | aux=/tmp/stc-$$.log |
7 | trap "rm -f $aux 2>/dev/null" EXIT | 7 | trap "rm -f $aux 2>/dev/null" EXIT |
8 | 8 | ||
9 | -onos ${1:-$OCI} "onos:summary" > $aux | 9 | +for i in {1..10}; do |
10 | -cat $aux | 10 | + onos ${1:-$OCI} "onos:summary" > $aux |
11 | + cat $aux | ||
11 | 12 | ||
12 | -let status=0 | 13 | + let status=0 |
13 | -grep -q "nodes=${2:-.*}" $aux || let status=status+1 | 14 | + grep -q "nodes=${2:-.*}" $aux || let status=status+1 |
14 | -grep -q "devices=${3:-.*}" $aux || let status=status+1 | 15 | + grep -q "devices=${3:-.*}" $aux || let status=status+1 |
15 | -grep -q "links=${4:-.*}" $aux || let status=status+1 | 16 | + grep -q "links=${4:-.*}" $aux || let status=status+1 |
16 | -grep -q "hosts=${5:-.*}" $aux || let status=status+1 | 17 | + grep -q "hosts=${5:-.*}" $aux || let status=status+1 |
17 | -grep -q "flows=${6:-.*}" $aux || let status=status+1 | 18 | + grep -q "flows=${6:-.*}" $aux || let status=status+1 |
18 | -grep -q "intents=${7:-.*}" $aux || let status=status+1 | 19 | + grep -q "intents=${7:-.*}" $aux || let status=status+1 |
20 | + | ||
21 | + if [ $status -eq 0 ]; then | ||
22 | + exit 0; | ||
23 | + fi | ||
24 | + sleep 1 | ||
25 | +done | ||
19 | 26 | ||
20 | exit $status | 27 | exit $status |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -15,89 +15,90 @@ | ... | @@ -15,89 +15,90 @@ |
15 | --> | 15 | --> |
16 | <scenario name="meta-apps" | 16 | <scenario name="meta-apps" |
17 | description="Openflow provider activate/deactivate test"> | 17 | description="Openflow provider activate/deactivate test"> |
18 | + <group name="Meta-App"> | ||
19 | + <!-- Check initial state of openflow apps --> | ||
20 | + <group name="MetaAppInitialVerification"> | ||
21 | + <parallel var="${OC#}" starts="MetaAppTest.FindOpenflowInitial-${#}" ends="MetaAppTest.CheckLldpProviderInitial-${#-1}"> | ||
22 | + <step name="MetaAppTest.FindOpenflowInitial-${#}" | ||
23 | + exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInitial" /> | ||
24 | + <step name="MetaAppTest.CheckOpenflowInitial-${#}" requires="MetaAppTest.FindOpenflowInitial-${#}" | ||
25 | + exec="test '${openflowAppInitialState}' == 'active'"/> | ||
26 | + | ||
27 | + <step name="MetaAppTest.FindOpenflowBaseInitial-${#}" | ||
28 | + exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInitial" /> | ||
29 | + <step name="MetaAppTest.CheckOpenflowBaseInitial-${#}" requires="MetaAppTest.FindOpenflowBaseInitial-${#}" | ||
30 | + exec="test '${openflowBaseInitialState}' == 'active'"/> | ||
31 | + | ||
32 | + <step name="MetaAppTest.FindHostProviderInitial-${#}" | ||
33 | + exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInitial" /> | ||
34 | + <step name="MetaAppTest.CheckHostProviderInitial-${#}" requires="MetaAppTest.FindHostProviderInitial-${#}" | ||
35 | + exec="test '${hostProviderInitialState}' == 'active'"/> | ||
36 | + | ||
37 | + <step name="MetaAppTest.FindLldpProviderInitial-${#}" | ||
38 | + exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInitial" /> | ||
39 | + <step name="MetaAppTest.CheckLldpProviderInitial-${#}" requires="MetaAppTest.FindLldpProviderInitial-${#}" | ||
40 | + exec="test '${lldpProviderInitialState}' == 'active'"/> | ||
41 | + </parallel> | ||
42 | + </group> | ||
43 | + | ||
44 | + <!-- Deactivate openflow meta app --> | ||
45 | + <step name="MetaAppTest.DeactivateOpenflowMetaApp" requires="MetaAppInitialVerification" | ||
46 | + exec="onos ${OCI} onos:app deactivate org.onosproject.openflow"/> | ||
47 | + | ||
48 | + <!-- Check that openflow apps are no longer active --> | ||
49 | + <group name="MetaAppInactive" requires="MetaAppTest.DeactivateOpenflowMetaApp,MetaAppInitialVerification"> | ||
50 | + <parallel var="${OC#}" starts="MetaAppTest.FindOpenflowInactive-${#}" ends="MetaAppTest.CheckLldpProviderInactive-${#-1}"> | ||
51 | + <step name="MetaAppTest.FindOpenflowInactive-${#}" | ||
52 | + exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInactive" /> | ||
53 | + <step name="MetaAppTest.CheckOpenflowInactive-${#}" requires="^" | ||
54 | + exec="test '${openflowAppInactiveState}' == 'inactive'"/> | ||
55 | + | ||
56 | + <step name="MetaAppTest.FindOpenflowBaseInactive-${#}" requires="^" | ||
57 | + exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInactive" /> | ||
58 | + <step name="MetaAppTest.CheckOpenflowBaseInactive-${#}" requires="^" | ||
59 | + exec="test '${openflowBaseInactiveState}' == 'inactive'"/> | ||
60 | + | ||
61 | + <step name="MetaAppTest.FindHostProviderInactive-${#}" requires="^" | ||
62 | + exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInactive" /> | ||
63 | + <step name="MetaAppTest.CheckHostProviderInactive-${#}" requires="^" | ||
64 | + exec="test '${hostProviderInactiveState}' == 'inactive'"/> | ||
65 | + | ||
66 | + <step name="MetaAppTest.FindLldpProviderInactive-${#}" requires="^" | ||
67 | + exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInactive" /> | ||
68 | + <step name="MetaAppTest.CheckLldpProviderInactive-${#}" requires="^" | ||
69 | + exec="test '${lldpProviderInactiveState}' == 'inactive'"/> | ||
70 | + </parallel> | ||
71 | + </group> | ||
72 | + | ||
73 | + <!-- Reactivate openflow meta app --> | ||
74 | + <step name="MetaAppTest.ReactivateOpenflowMetaApp" requires="MetaAppInactive" | ||
75 | + exec="onos ${OCI} onos:app activate org.onosproject.openflow"/> | ||
76 | + | ||
77 | + <!-- Check that openflow apps are now active again --> | ||
78 | + <group name="MetaAppReactivated" requires="MetaAppTest.ReactivateOpenflowMetaApp,MetaAppInactive,MetaAppInitialVerification"> | ||
79 | + <parallel var="${OC#}" starts="MetaAppTest.FindOpenflowReactivated-${#}" ends="MetaAppTest.CheckLldpProviderRectivated-${#-1}"> | ||
80 | + <step name="MetaAppTest.FindOpenflowReactivated-${#}" | ||
81 | + exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppReactivated" /> | ||
82 | + <step name="MetaAppTest.CheckOpenflowReactivated-${#}" requires="^" | ||
83 | + exec="test '${openflowAppReactivatedState}' == 'active'"/> | ||
84 | + | ||
85 | + <step name="MetaAppTest.FindOpenflowBaseReactivated-${#}" requires="^" | ||
86 | + exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseReactivated" /> | ||
87 | + <step name="MetaAppTest.CheckOpenflowBaseReactivated-${#}" requires="^" | ||
88 | + exec="test '${openflowBaseReactivatedState}' == 'active'"/> | ||
89 | + | ||
90 | + <step name="MetaAppTest.FindHostProviderReactivated-${#}" requires="^" | ||
91 | + exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderReactivated" /> | ||
92 | + <step name="MetaAppTest.CheckHostProviderReactivated-${#}" requires="^" | ||
93 | + exec="test '${hostProviderReactivatedState}' == 'active'"/> | ||
94 | + | ||
95 | + <step name="MetaAppTest.FindLldpProviderReactivated-${#}" requires="^" | ||
96 | + exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderReactivated" /> | ||
97 | + <step name="MetaAppTest.CheckLldpProviderReactivated-${#}" requires="^" | ||
98 | + exec="test '${lldpProviderReactivatedState}' == 'active'"/> | ||
99 | + </parallel> | ||
100 | + </group> | ||
18 | 101 | ||
19 | - | ||
20 | - <!-- Check initial state of openflow apps --> | ||
21 | - <group name="MetaAppInitialVerification"> | ||
22 | - <sequential var="${OC#}" starts="MetaAppTest.FindOpenflowInitial-${#}" ends="MetaAppTest.CheckLldpProviderInitial-${#-1}"> | ||
23 | - <step name="MetaAppTest.FindOpenflowInitial-${#}" | ||
24 | - exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInitial" /> | ||
25 | - <step name="MetaAppTest.CheckOpenflowInitial-${#}" requires="MetaAppTest.FindOpenflowInitial-${#}" | ||
26 | - exec="test '${openflowAppInitialState}' == 'active'"/> | ||
27 | - | ||
28 | - <step name="MetaAppTest.FindOpenflowBaseInitial-${#}" | ||
29 | - exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInitial" /> | ||
30 | - <step name="MetaAppTest.CheckOpenflowBaseInitial-${#}" requires="MetaAppTest.FindOpenflowBaseInitial-${#}" | ||
31 | - exec="test '${openflowBaseInitialState}' == 'active'"/> | ||
32 | - | ||
33 | - <step name="MetaAppTest.FindHostProviderInitial-${#}" | ||
34 | - exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInitial" /> | ||
35 | - <step name="MetaAppTest.CheckHostProviderInitial-${#}" requires="MetaAppTest.FindHostProviderInitial-${#}" | ||
36 | - exec="test '${hostProviderInitialState}' == 'active'"/> | ||
37 | - | ||
38 | - <step name="MetaAppTest.FindLldpProviderInitial-${#}" | ||
39 | - exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInitial" /> | ||
40 | - <step name="MetaAppTest.CheckLldpProviderInitial-${#}" requires="MetaAppTest.FindLldpProviderInitial-${#}" | ||
41 | - exec="test '${lldpProviderInitialState}' == 'active'"/> | ||
42 | - </sequential> | ||
43 | - </group> | ||
44 | - | ||
45 | - <!-- Deactivate openflow meta app --> | ||
46 | - <step name="MetaAppTest.DeactivateOpenflowMetaApp" requires="MetaAppInitialVerification" | ||
47 | - exec="onos ${OCI} onos:app deactivate org.onosproject.openflow"/> | ||
48 | - | ||
49 | - <!-- Check that openflow apps are no longer active --> | ||
50 | - <group name="MetaAppInactive" requires="MetaAppTest.DeactivateOpenflowMetaApp,MetaAppInitialVerification"> | ||
51 | - <sequential var="${OC#}" starts="MetaAppTest.FindOpenflowInactive-${#}" ends="MetaAppTest.CheckLldpProviderInactive-${#-1}"> | ||
52 | - <step name="MetaAppTest.FindOpenflowInactive-${#}" | ||
53 | - exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInactive" /> | ||
54 | - <step name="MetaAppTest.CheckOpenflowInactive-${#}" requires="^" | ||
55 | - exec="test '${openflowAppInactiveState}' == 'inactive'"/> | ||
56 | - | ||
57 | - <step name="MetaAppTest.FindOpenflowBaseInactive-${#}" requires="^" | ||
58 | - exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInactive" /> | ||
59 | - <step name="MetaAppTest.CheckOpenflowBaseInactive-${#}" requires="^" | ||
60 | - exec="test '${openflowBaseInactiveState}' == 'inactive'"/> | ||
61 | - | ||
62 | - <step name="MetaAppTest.FindHostProviderInactive-${#}" requires="^" | ||
63 | - exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInactive" /> | ||
64 | - <step name="MetaAppTest.CheckHostProviderInactive-${#}" requires="^" | ||
65 | - exec="test '${hostProviderInactiveState}' == 'inactive'"/> | ||
66 | - | ||
67 | - <step name="MetaAppTest.FindLldpProviderInactive-${#}" requires="^" | ||
68 | - exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInactive" /> | ||
69 | - <step name="MetaAppTest.CheckLldpProviderInactive-${#}" requires="^" | ||
70 | - exec="test '${lldpProviderInactiveState}' == 'inactive'"/> | ||
71 | - </sequential> | ||
72 | - </group> | ||
73 | - | ||
74 | - <!-- Reactivate openflow meta app --> | ||
75 | - <step name="MetaAppTest.ReactivateOpenflowMetaApp" requires="MetaAppInactive" | ||
76 | - exec="onos ${OCI} onos:app activate org.onosproject.openflow"/> | ||
77 | - | ||
78 | - <!-- Check that openflow apps are now active again --> | ||
79 | - <group name="MetaAppReactivated" requires="MetaAppTest.ReactivateOpenflowMetaApp,MetaAppInactive,MetaAppInitialVerification"> | ||
80 | - <sequential var="${OC#}" starts="MetaAppTest.FindOpenflowReactivated-${#}" ends="MetaAppTest.CheckLldpProviderRectivated-${#-1}"> | ||
81 | - <step name="MetaAppTest.FindOpenflowReactivated-${#}" | ||
82 | - exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppReactivated" /> | ||
83 | - <step name="MetaAppTest.CheckOpenflowReactivated-${#}" requires="^" | ||
84 | - exec="test '${openflowAppReactivatedState}' == 'active'"/> | ||
85 | - | ||
86 | - <step name="MetaAppTest.FindOpenflowBaseReactivated-${#}" requires="^" | ||
87 | - exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseReactivated" /> | ||
88 | - <step name="MetaAppTest.CheckOpenflowBaseReactivated-${#}" requires="^" | ||
89 | - exec="test '${openflowBaseReactivatedState}' == 'active'"/> | ||
90 | - | ||
91 | - <step name="MetaAppTest.FindHostProviderReactivated-${#}" requires="^" | ||
92 | - exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderReactivated" /> | ||
93 | - <step name="MetaAppTest.CheckHostProviderReactivated-${#}" requires="^" | ||
94 | - exec="test '${hostProviderReactivatedState}' == 'active'"/> | ||
95 | - | ||
96 | - <step name="MetaAppTest.FindLldpProviderReactivated-${#}" requires="^" | ||
97 | - exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderReactivated" /> | ||
98 | - <step name="MetaAppTest.CheckLldpProviderReactivated-${#}" requires="^" | ||
99 | - exec="test '${lldpProviderReactivatedState}' == 'active'"/> | ||
100 | - </sequential> | ||
101 | </group> | 102 | </group> |
102 | 103 | ||
103 | </scenario> | 104 | </scenario> | ... | ... |
... | @@ -20,23 +20,21 @@ | ... | @@ -20,23 +20,21 @@ |
20 | <import file="${ONOS_SCENARIOS}/setup.xml"/> | 20 | <import file="${ONOS_SCENARIOS}/setup.xml"/> |
21 | <dependency name="Setup" requires="Prerequisites,Net-Prerequisites"/> | 21 | <dependency name="Setup" requires="Prerequisites,Net-Prerequisites"/> |
22 | 22 | ||
23 | - <import file="${ONOS_SCENARIOS}/meta-apps-test.xml"/> | ||
24 | - <dependency name="MetaAppReactivated" requires="Setup"/> | ||
25 | - <dependency name="MetaAppInactive" requires="Setup"/> | ||
26 | - <dependency name="MetaAppInitialVerification" requires="Setup"/> | ||
27 | - | ||
28 | <import file="${ONOS_SCENARIOS}/net-smoke.xml"/> | 23 | <import file="${ONOS_SCENARIOS}/net-smoke.xml"/> |
29 | <dependency name="Net-Smoke" requires="Setup"/> | 24 | <dependency name="Net-Smoke" requires="Setup"/> |
30 | 25 | ||
31 | - <import file="${ONOS_SCENARIOS}/archetypes.xml"/> | 26 | + <import file="${ONOS_SCENARIOS}/meta-apps-test.xml"/> |
32 | - <dependency name="Archetypes" requires="Setup"/> | 27 | + <dependency name="Meta-App" requires="Setup,~Net-Smoke"/> |
33 | 28 | ||
34 | - <import file="${ONOS_SCENARIOS}/drivers-test.xml"/> | 29 | + <import file="${ONOS_SCENARIOS}/archetypes.xml"/> |
35 | - <dependency name="Drivers-Test" requires="Setup,Net-Smoke,Archetypes"/> | 30 | + <dependency name="Archetypes" requires="Setup,~Net-Smoke"/> |
36 | 31 | ||
37 | <import file="${ONOS_SCENARIOS}/netcfg.xml"/> | 32 | <import file="${ONOS_SCENARIOS}/netcfg.xml"/> |
38 | - <dependency name="Netcfg" requires="Setup"/> | 33 | + <dependency name="Netcfg" requires="Setup,~Meta-App"/> |
34 | + | ||
35 | + <import file="${ONOS_SCENARIOS}/drivers-test.xml"/> | ||
36 | + <dependency name="Drivers-Test" requires="Setup,~Net-Smoke,~Archetypes"/> | ||
39 | 37 | ||
40 | <import file="${ONOS_SCENARIOS}/wrapup.xml"/> | 38 | <import file="${ONOS_SCENARIOS}/wrapup.xml"/> |
41 | - <dependency name="Wrapup" requires="~Archetypes,~Setup,~Net-Smoke,~Drivers-Test,~MetaAppReactivated,~Netcfg"/> | 39 | + <dependency name="Wrapup" requires="~Archetypes,~Setup,~Net-Smoke,~Drivers-Test,~Meta-App,~Netcfg"/> |
42 | </scenario> | 40 | </scenario> | ... | ... |
-
Please register or login to post a comment