Thomas Vachuska

Adding more patience to onos-check-summary and changing sequencing of smoke.xml scenario.

Change-Id: I1db9084524daa8c5494d0066be30d801e78d0fc3
......@@ -6,15 +6,22 @@
aux=/tmp/stc-$$.log
trap "rm -f $aux 2>/dev/null" EXIT
onos ${1:-$OCI} "onos:summary" > $aux
cat $aux
for i in {1..10}; do
onos ${1:-$OCI} "onos:summary" > $aux
cat $aux
let status=0
grep -q "nodes=${2:-.*}" $aux || let status=status+1
grep -q "devices=${3:-.*}" $aux || let status=status+1
grep -q "links=${4:-.*}" $aux || let status=status+1
grep -q "hosts=${5:-.*}" $aux || let status=status+1
grep -q "flows=${6:-.*}" $aux || let status=status+1
grep -q "intents=${7:-.*}" $aux || let status=status+1
let status=0
grep -q "nodes=${2:-.*}" $aux || let status=status+1
grep -q "devices=${3:-.*}" $aux || let status=status+1
grep -q "links=${4:-.*}" $aux || let status=status+1
grep -q "hosts=${5:-.*}" $aux || let status=status+1
grep -q "flows=${6:-.*}" $aux || let status=status+1
grep -q "intents=${7:-.*}" $aux || let status=status+1
if [ $status -eq 0 ]; then
exit 0;
fi
sleep 1
done
exit $status
\ No newline at end of file
......
......@@ -15,11 +15,10 @@
-->
<scenario name="meta-apps"
description="Openflow provider activate/deactivate test">
<group name="Meta-App">
<!-- Check initial state of openflow apps -->
<group name="MetaAppInitialVerification">
<sequential var="${OC#}" starts="MetaAppTest.FindOpenflowInitial-${#}" ends="MetaAppTest.CheckLldpProviderInitial-${#-1}">
<parallel var="${OC#}" starts="MetaAppTest.FindOpenflowInitial-${#}" ends="MetaAppTest.CheckLldpProviderInitial-${#-1}">
<step name="MetaAppTest.FindOpenflowInitial-${#}"
exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInitial" />
<step name="MetaAppTest.CheckOpenflowInitial-${#}" requires="MetaAppTest.FindOpenflowInitial-${#}"
......@@ -39,7 +38,7 @@
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInitial" />
<step name="MetaAppTest.CheckLldpProviderInitial-${#}" requires="MetaAppTest.FindLldpProviderInitial-${#}"
exec="test '${lldpProviderInitialState}' == 'active'"/>
</sequential>
</parallel>
</group>
<!-- Deactivate openflow meta app -->
......@@ -48,7 +47,7 @@
<!-- Check that openflow apps are no longer active -->
<group name="MetaAppInactive" requires="MetaAppTest.DeactivateOpenflowMetaApp,MetaAppInitialVerification">
<sequential var="${OC#}" starts="MetaAppTest.FindOpenflowInactive-${#}" ends="MetaAppTest.CheckLldpProviderInactive-${#-1}">
<parallel var="${OC#}" starts="MetaAppTest.FindOpenflowInactive-${#}" ends="MetaAppTest.CheckLldpProviderInactive-${#-1}">
<step name="MetaAppTest.FindOpenflowInactive-${#}"
exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInactive" />
<step name="MetaAppTest.CheckOpenflowInactive-${#}" requires="^"
......@@ -68,7 +67,7 @@
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInactive" />
<step name="MetaAppTest.CheckLldpProviderInactive-${#}" requires="^"
exec="test '${lldpProviderInactiveState}' == 'inactive'"/>
</sequential>
</parallel>
</group>
<!-- Reactivate openflow meta app -->
......@@ -77,7 +76,7 @@
<!-- Check that openflow apps are now active again -->
<group name="MetaAppReactivated" requires="MetaAppTest.ReactivateOpenflowMetaApp,MetaAppInactive,MetaAppInitialVerification">
<sequential var="${OC#}" starts="MetaAppTest.FindOpenflowReactivated-${#}" ends="MetaAppTest.CheckLldpProviderRectivated-${#-1}">
<parallel var="${OC#}" starts="MetaAppTest.FindOpenflowReactivated-${#}" ends="MetaAppTest.CheckLldpProviderRectivated-${#-1}">
<step name="MetaAppTest.FindOpenflowReactivated-${#}"
exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppReactivated" />
<step name="MetaAppTest.CheckOpenflowReactivated-${#}" requires="^"
......@@ -97,7 +96,9 @@
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderReactivated" />
<step name="MetaAppTest.CheckLldpProviderReactivated-${#}" requires="^"
exec="test '${lldpProviderReactivatedState}' == 'active'"/>
</sequential>
</parallel>
</group>
</group>
</scenario>
......
......@@ -20,23 +20,21 @@
<import file="${ONOS_SCENARIOS}/setup.xml"/>
<dependency name="Setup" requires="Prerequisites,Net-Prerequisites"/>
<import file="${ONOS_SCENARIOS}/meta-apps-test.xml"/>
<dependency name="MetaAppReactivated" requires="Setup"/>
<dependency name="MetaAppInactive" requires="Setup"/>
<dependency name="MetaAppInitialVerification" requires="Setup"/>
<import file="${ONOS_SCENARIOS}/net-smoke.xml"/>
<dependency name="Net-Smoke" requires="Setup"/>
<import file="${ONOS_SCENARIOS}/archetypes.xml"/>
<dependency name="Archetypes" requires="Setup"/>
<import file="${ONOS_SCENARIOS}/meta-apps-test.xml"/>
<dependency name="Meta-App" requires="Setup,~Net-Smoke"/>
<import file="${ONOS_SCENARIOS}/drivers-test.xml"/>
<dependency name="Drivers-Test" requires="Setup,Net-Smoke,Archetypes"/>
<import file="${ONOS_SCENARIOS}/archetypes.xml"/>
<dependency name="Archetypes" requires="Setup,~Net-Smoke"/>
<import file="${ONOS_SCENARIOS}/netcfg.xml"/>
<dependency name="Netcfg" requires="Setup"/>
<dependency name="Netcfg" requires="Setup,~Meta-App"/>
<import file="${ONOS_SCENARIOS}/drivers-test.xml"/>
<dependency name="Drivers-Test" requires="Setup,~Net-Smoke,~Archetypes"/>
<import file="${ONOS_SCENARIOS}/wrapup.xml"/>
<dependency name="Wrapup" requires="~Archetypes,~Setup,~Net-Smoke,~Drivers-Test,~MetaAppReactivated,~Netcfg"/>
<dependency name="Wrapup" requires="~Archetypes,~Setup,~Net-Smoke,~Drivers-Test,~Meta-App,~Netcfg"/>
</scenario>
......