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,89 +15,90 @@
-->
<scenario name="meta-apps"
description="Openflow provider activate/deactivate test">
<group name="Meta-App">
<!-- Check initial state of openflow apps -->
<group name="MetaAppInitialVerification">
<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-${#}"
exec="test '${openflowAppInitialState}' == 'active'"/>
<step name="MetaAppTest.FindOpenflowBaseInitial-${#}"
exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInitial" />
<step name="MetaAppTest.CheckOpenflowBaseInitial-${#}" requires="MetaAppTest.FindOpenflowBaseInitial-${#}"
exec="test '${openflowBaseInitialState}' == 'active'"/>
<step name="MetaAppTest.FindHostProviderInitial-${#}"
exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInitial" />
<step name="MetaAppTest.CheckHostProviderInitial-${#}" requires="MetaAppTest.FindHostProviderInitial-${#}"
exec="test '${hostProviderInitialState}' == 'active'"/>
<step name="MetaAppTest.FindLldpProviderInitial-${#}"
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInitial" />
<step name="MetaAppTest.CheckLldpProviderInitial-${#}" requires="MetaAppTest.FindLldpProviderInitial-${#}"
exec="test '${lldpProviderInitialState}' == 'active'"/>
</parallel>
</group>
<!-- Deactivate openflow meta app -->
<step name="MetaAppTest.DeactivateOpenflowMetaApp" requires="MetaAppInitialVerification"
exec="onos ${OCI} onos:app deactivate org.onosproject.openflow"/>
<!-- Check that openflow apps are no longer active -->
<group name="MetaAppInactive" requires="MetaAppTest.DeactivateOpenflowMetaApp,MetaAppInitialVerification">
<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="^"
exec="test '${openflowAppInactiveState}' == 'inactive'"/>
<step name="MetaAppTest.FindOpenflowBaseInactive-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInactive" />
<step name="MetaAppTest.CheckOpenflowBaseInactive-${#}" requires="^"
exec="test '${openflowBaseInactiveState}' == 'inactive'"/>
<step name="MetaAppTest.FindHostProviderInactive-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInactive" />
<step name="MetaAppTest.CheckHostProviderInactive-${#}" requires="^"
exec="test '${hostProviderInactiveState}' == 'inactive'"/>
<step name="MetaAppTest.FindLldpProviderInactive-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInactive" />
<step name="MetaAppTest.CheckLldpProviderInactive-${#}" requires="^"
exec="test '${lldpProviderInactiveState}' == 'inactive'"/>
</parallel>
</group>
<!-- Reactivate openflow meta app -->
<step name="MetaAppTest.ReactivateOpenflowMetaApp" requires="MetaAppInactive"
exec="onos ${OCI} onos:app activate org.onosproject.openflow"/>
<!-- Check that openflow apps are now active again -->
<group name="MetaAppReactivated" requires="MetaAppTest.ReactivateOpenflowMetaApp,MetaAppInactive,MetaAppInitialVerification">
<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="^"
exec="test '${openflowAppReactivatedState}' == 'active'"/>
<step name="MetaAppTest.FindOpenflowBaseReactivated-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseReactivated" />
<step name="MetaAppTest.CheckOpenflowBaseReactivated-${#}" requires="^"
exec="test '${openflowBaseReactivatedState}' == 'active'"/>
<step name="MetaAppTest.FindHostProviderReactivated-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderReactivated" />
<step name="MetaAppTest.CheckHostProviderReactivated-${#}" requires="^"
exec="test '${hostProviderReactivatedState}' == 'active'"/>
<step name="MetaAppTest.FindLldpProviderReactivated-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderReactivated" />
<step name="MetaAppTest.CheckLldpProviderReactivated-${#}" requires="^"
exec="test '${lldpProviderReactivatedState}' == 'active'"/>
</parallel>
</group>
<!-- Check initial state of openflow apps -->
<group name="MetaAppInitialVerification">
<sequential 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-${#}"
exec="test '${openflowAppInitialState}' == 'active'"/>
<step name="MetaAppTest.FindOpenflowBaseInitial-${#}"
exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInitial" />
<step name="MetaAppTest.CheckOpenflowBaseInitial-${#}" requires="MetaAppTest.FindOpenflowBaseInitial-${#}"
exec="test '${openflowBaseInitialState}' == 'active'"/>
<step name="MetaAppTest.FindHostProviderInitial-${#}"
exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInitial" />
<step name="MetaAppTest.CheckHostProviderInitial-${#}" requires="MetaAppTest.FindHostProviderInitial-${#}"
exec="test '${hostProviderInitialState}' == 'active'"/>
<step name="MetaAppTest.FindLldpProviderInitial-${#}"
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInitial" />
<step name="MetaAppTest.CheckLldpProviderInitial-${#}" requires="MetaAppTest.FindLldpProviderInitial-${#}"
exec="test '${lldpProviderInitialState}' == 'active'"/>
</sequential>
</group>
<!-- Deactivate openflow meta app -->
<step name="MetaAppTest.DeactivateOpenflowMetaApp" requires="MetaAppInitialVerification"
exec="onos ${OCI} onos:app deactivate org.onosproject.openflow"/>
<!-- 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}">
<step name="MetaAppTest.FindOpenflowInactive-${#}"
exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInactive" />
<step name="MetaAppTest.CheckOpenflowInactive-${#}" requires="^"
exec="test '${openflowAppInactiveState}' == 'inactive'"/>
<step name="MetaAppTest.FindOpenflowBaseInactive-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInactive" />
<step name="MetaAppTest.CheckOpenflowBaseInactive-${#}" requires="^"
exec="test '${openflowBaseInactiveState}' == 'inactive'"/>
<step name="MetaAppTest.FindHostProviderInactive-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInactive" />
<step name="MetaAppTest.CheckHostProviderInactive-${#}" requires="^"
exec="test '${hostProviderInactiveState}' == 'inactive'"/>
<step name="MetaAppTest.FindLldpProviderInactive-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInactive" />
<step name="MetaAppTest.CheckLldpProviderInactive-${#}" requires="^"
exec="test '${lldpProviderInactiveState}' == 'inactive'"/>
</sequential>
</group>
<!-- Reactivate openflow meta app -->
<step name="MetaAppTest.ReactivateOpenflowMetaApp" requires="MetaAppInactive"
exec="onos ${OCI} onos:app activate org.onosproject.openflow"/>
<!-- 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}">
<step name="MetaAppTest.FindOpenflowReactivated-${#}"
exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppReactivated" />
<step name="MetaAppTest.CheckOpenflowReactivated-${#}" requires="^"
exec="test '${openflowAppReactivatedState}' == 'active'"/>
<step name="MetaAppTest.FindOpenflowBaseReactivated-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseReactivated" />
<step name="MetaAppTest.CheckOpenflowBaseReactivated-${#}" requires="^"
exec="test '${openflowBaseReactivatedState}' == 'active'"/>
<step name="MetaAppTest.FindHostProviderReactivated-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderReactivated" />
<step name="MetaAppTest.CheckHostProviderReactivated-${#}" requires="^"
exec="test '${hostProviderReactivatedState}' == 'active'"/>
<step name="MetaAppTest.FindLldpProviderReactivated-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderReactivated" />
<step name="MetaAppTest.CheckLldpProviderReactivated-${#}" requires="^"
exec="test '${lldpProviderReactivatedState}' == 'active'"/>
</sequential>
</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>
......