Adding app reactivation scenario; part of smoke test.
Change-Id: I8aab34796f51acf5a1a6c05709d016bec2b79382
diff --git a/tools/test/scenarios/app-reactivate.xml b/tools/test/scenarios/app-reactivate.xml
new file mode 100644
index 0000000..865f218
--- /dev/null
+++ b/tools/test/scenarios/app-reactivate.xml
@@ -0,0 +1,46 @@
+<!--
+ ~ Copyright 2017-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<scenario name="app-reactivate" description="Application re-activation test">
+ <group name="App-Reactivation">
+ <step name="App-Activate"
+ exec="onos ${OCI} app activate org.onosproject.pathpainter"/>
+ <group name="App-Component-Check" requires="App-Activate">
+ <parallel var="${OC#}">
+ <step name="App-Component-Check-${#}"
+ exec="onos-check-component ${OC#} org.onosproject.pathpainter.PathPainter ACTIVE"/>
+ </parallel>
+ </group>
+
+ <step name="App-Deactivate"
+ exec="onos ${OCI} app deactivate org.onosproject.pathpainter"
+ requires="App-Component-Check"/>
+
+ <step name="App-Reactivate"
+ exec="onos ${OCI} app activate org.onosproject.pathpainter"
+ requires="^"/>
+
+ <group name="App-Component-Check-Again" requires="App-Reactivate">
+ <parallel var="${OC#}">
+ <step name="App-Component-Check-Again-${#}"
+ exec="onos-check-component ${OC#} org.onosproject.pathpainter.PathPainter ACTIVE"/>
+ </parallel>
+ </group>
+
+ <step name="App-Deactivate-Again"
+ exec="onos ${OCI} app deactivate org.onosproject.pathpainter"
+ requires="App-Component-Check-Again"/>
+ </group>
+</scenario>
diff --git a/tools/test/scenarios/smoke.xml b/tools/test/scenarios/smoke.xml
index c08e8a4..4661a61 100644
--- a/tools/test/scenarios/smoke.xml
+++ b/tools/test/scenarios/smoke.xml
@@ -17,6 +17,7 @@
<import file="${ONOS_SCENARIOS}/prerequisites.xml"/>
<import file="${ONOS_SCENARIOS}/net-prerequisites.xml"/>
<import file="${ONOS_SCENARIOS}/setup.xml"/>
+ <import file="${ONOS_SCENARIOS}/app-reactivate.xml"/>
<import file="${ONOS_SCENARIOS}/maps-cli.xml"/>
<import file="${ONOS_SCENARIOS}/dist-test.xml"/>
<import file="${ONOS_SCENARIOS}/smoke-internal.xml"/>
@@ -25,6 +26,7 @@
<dependency name="Setup" requires="Prerequisites,Net-Prerequisites"/>
<dependency name="Net-Smoke" requires="Setup"/>
+ <dependency name="App-Reactivation" requires="Setup"/>
<dependency name="Maps-Cli" requires="Setup"/>
<dependency name="Drivers-Test" requires="Setup"/>
<dependency name="Meta-App" requires="Setup"/>
@@ -34,5 +36,5 @@
<dependency name="YANG-Live-Compile" requires="Setup,~YANG-Smoke"/>
<import file="${ONOS_SCENARIOS}/wrapup.xml"/>
- <dependency name="Wrapup" requires="~Setup,~Net-Smoke,~Drivers-Test,~Meta-App,~Netcfg,~YANG-Smoke,~YANG-Live-Compile"/>
+ <dependency name="Wrapup" requires="~Setup,~Net-Smoke,~App-Reactivation,~Drivers-Test,~Meta-App,~Netcfg,~YANG-Smoke,~YANG-Live-Compile"/>
</scenario>