Adding more patience to onos-check-summary and changing sequencing of smoke.xml scenario.
Change-Id: I1db9084524daa8c5494d0066be30d801e78d0fc3
Showing
3 changed files
with
34 additions
and
28 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,11 +15,10 @@ | ... | @@ -15,11 +15,10 @@ |
| 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 | - | 18 | + <group name="Meta-App"> |
| 19 | - | ||
| 20 | <!-- Check initial state of openflow apps --> | 19 | <!-- Check initial state of openflow apps --> |
| 21 | <group name="MetaAppInitialVerification"> | 20 | <group name="MetaAppInitialVerification"> |
| 22 | - <sequential var="${OC#}" starts="MetaAppTest.FindOpenflowInitial-${#}" ends="MetaAppTest.CheckLldpProviderInitial-${#-1}"> | 21 | + <parallel var="${OC#}" starts="MetaAppTest.FindOpenflowInitial-${#}" ends="MetaAppTest.CheckLldpProviderInitial-${#-1}"> |
| 23 | <step name="MetaAppTest.FindOpenflowInitial-${#}" | 22 | <step name="MetaAppTest.FindOpenflowInitial-${#}" |
| 24 | exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInitial" /> | 23 | exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInitial" /> |
| 25 | <step name="MetaAppTest.CheckOpenflowInitial-${#}" requires="MetaAppTest.FindOpenflowInitial-${#}" | 24 | <step name="MetaAppTest.CheckOpenflowInitial-${#}" requires="MetaAppTest.FindOpenflowInitial-${#}" |
| ... | @@ -39,7 +38,7 @@ | ... | @@ -39,7 +38,7 @@ |
| 39 | exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInitial" /> | 38 | exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInitial" /> |
| 40 | <step name="MetaAppTest.CheckLldpProviderInitial-${#}" requires="MetaAppTest.FindLldpProviderInitial-${#}" | 39 | <step name="MetaAppTest.CheckLldpProviderInitial-${#}" requires="MetaAppTest.FindLldpProviderInitial-${#}" |
| 41 | exec="test '${lldpProviderInitialState}' == 'active'"/> | 40 | exec="test '${lldpProviderInitialState}' == 'active'"/> |
| 42 | - </sequential> | 41 | + </parallel> |
| 43 | </group> | 42 | </group> |
| 44 | 43 | ||
| 45 | <!-- Deactivate openflow meta app --> | 44 | <!-- Deactivate openflow meta app --> |
| ... | @@ -48,7 +47,7 @@ | ... | @@ -48,7 +47,7 @@ |
| 48 | 47 | ||
| 49 | <!-- Check that openflow apps are no longer active --> | 48 | <!-- Check that openflow apps are no longer active --> |
| 50 | <group name="MetaAppInactive" requires="MetaAppTest.DeactivateOpenflowMetaApp,MetaAppInitialVerification"> | 49 | <group name="MetaAppInactive" requires="MetaAppTest.DeactivateOpenflowMetaApp,MetaAppInitialVerification"> |
| 51 | - <sequential var="${OC#}" starts="MetaAppTest.FindOpenflowInactive-${#}" ends="MetaAppTest.CheckLldpProviderInactive-${#-1}"> | 50 | + <parallel var="${OC#}" starts="MetaAppTest.FindOpenflowInactive-${#}" ends="MetaAppTest.CheckLldpProviderInactive-${#-1}"> |
| 52 | <step name="MetaAppTest.FindOpenflowInactive-${#}" | 51 | <step name="MetaAppTest.FindOpenflowInactive-${#}" |
| 53 | exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInactive" /> | 52 | exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInactive" /> |
| 54 | <step name="MetaAppTest.CheckOpenflowInactive-${#}" requires="^" | 53 | <step name="MetaAppTest.CheckOpenflowInactive-${#}" requires="^" |
| ... | @@ -68,7 +67,7 @@ | ... | @@ -68,7 +67,7 @@ |
| 68 | exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInactive" /> | 67 | exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInactive" /> |
| 69 | <step name="MetaAppTest.CheckLldpProviderInactive-${#}" requires="^" | 68 | <step name="MetaAppTest.CheckLldpProviderInactive-${#}" requires="^" |
| 70 | exec="test '${lldpProviderInactiveState}' == 'inactive'"/> | 69 | exec="test '${lldpProviderInactiveState}' == 'inactive'"/> |
| 71 | - </sequential> | 70 | + </parallel> |
| 72 | </group> | 71 | </group> |
| 73 | 72 | ||
| 74 | <!-- Reactivate openflow meta app --> | 73 | <!-- Reactivate openflow meta app --> |
| ... | @@ -77,7 +76,7 @@ | ... | @@ -77,7 +76,7 @@ |
| 77 | 76 | ||
| 78 | <!-- Check that openflow apps are now active again --> | 77 | <!-- Check that openflow apps are now active again --> |
| 79 | <group name="MetaAppReactivated" requires="MetaAppTest.ReactivateOpenflowMetaApp,MetaAppInactive,MetaAppInitialVerification"> | 78 | <group name="MetaAppReactivated" requires="MetaAppTest.ReactivateOpenflowMetaApp,MetaAppInactive,MetaAppInitialVerification"> |
| 80 | - <sequential var="${OC#}" starts="MetaAppTest.FindOpenflowReactivated-${#}" ends="MetaAppTest.CheckLldpProviderRectivated-${#-1}"> | 79 | + <parallel var="${OC#}" starts="MetaAppTest.FindOpenflowReactivated-${#}" ends="MetaAppTest.CheckLldpProviderRectivated-${#-1}"> |
| 81 | <step name="MetaAppTest.FindOpenflowReactivated-${#}" | 80 | <step name="MetaAppTest.FindOpenflowReactivated-${#}" |
| 82 | exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppReactivated" /> | 81 | exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppReactivated" /> |
| 83 | <step name="MetaAppTest.CheckOpenflowReactivated-${#}" requires="^" | 82 | <step name="MetaAppTest.CheckOpenflowReactivated-${#}" requires="^" |
| ... | @@ -97,7 +96,9 @@ | ... | @@ -97,7 +96,9 @@ |
| 97 | exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderReactivated" /> | 96 | exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderReactivated" /> |
| 98 | <step name="MetaAppTest.CheckLldpProviderReactivated-${#}" requires="^" | 97 | <step name="MetaAppTest.CheckLldpProviderReactivated-${#}" requires="^" |
| 99 | exec="test '${lldpProviderReactivatedState}' == 'active'"/> | 98 | exec="test '${lldpProviderReactivatedState}' == 'active'"/> |
| 100 | - </sequential> | 99 | + </parallel> |
| 100 | + </group> | ||
| 101 | + | ||
| 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