Enhancing STC and scenarios.

Change-Id: I1227e68f8a44707f671b09dcd2967b580e14ca79
diff --git a/tools/test/scenarios/archetypes.xml b/tools/test/scenarios/archetypes.xml
index 42c4ffb..f83879c 100644
--- a/tools/test/scenarios/archetypes.xml
+++ b/tools/test/scenarios/archetypes.xml
@@ -18,28 +18,28 @@
         <step name="Clean-Up" cwd="${WORKSPACE}/tmp" env="~"
               exec="rm -r test-app"/>
 
-        <step name="Create-App" cwd="${WORKSPACE}/tmp" requires="Clean-Up"
+        <step name="Create-App" cwd="${WORKSPACE}/tmp" requires="^"
               exec="onos-create-app app org.test.app test-app 1.2.3 org.test.app -DinteractiveMode=false"/>
         <step name="Build-App" requires="Create-App" exec="mvn clean install"/>
-        <step name="Install-App" requires="Build-App"
+        <step name="Install-App" requires="^"
               exec="onos-app ${OCI} install! target/test-app-1.2.3.oar"/>
-        <step name="Verify-App" requires="Install-App"
+        <step name="Verify-App" requires="^"
               exec="onos-check-components ${OCI} org.test.app.AppComponent"/>
 
         <step name="Create-App-CLI-Overlay" requires="Install-App"
               exec="onos-create-app cli org.test.app test-app 1.2.3 org.test.app -DinteractiveMode=false"/>
-        <step name="Build-App-With-CLI" requires="Create-App-CLI-Overlay"
+        <step name="Build-App-With-CLI" requires="^"
               exec="mvn clean install"/>
-        <step name="Reinstall-App-With-CLI" requires="Build-App-With-CLI,-Verify-App"
+        <step name="Reinstall-App-With-CLI" requires="^,~Verify-App"
               exec="onos-app ${OCI} reinstall! target/test-app-1.2.3.oar"/>
-        <step name="Verify-CLI" requires="Reinstall-App-With-CLI"
+        <step name="Verify-CLI" requires="^"
               exec="onos ${OCI} sample"/>
 
         <step name="Create-App-UI-Overlay" requires="Reinstall-App-With-CLI"
               exec="onos-create-app ui org.test.app test-app 1.2.3 org.test.app -DinteractiveMode=false"/>
-        <step name="Build-App-With-UI" requires="Create-App-UI-Overlay"
+        <step name="Build-App-With-UI" requires="^"
               exec="mvn clean install"/>
-        <step name="Reinstall-App-With-UI" requires="Build-App-With-UI,-Verify-CLI"
+        <step name="Reinstall-App-With-UI" requires="^,~Verify-CLI"
               exec="onos-app ${OCI} reinstall! target/test-app-1.2.3.oar"/>
     </group>
 </scenario>
diff --git a/tools/test/scenarios/setup.xml b/tools/test/scenarios/setup.xml
index d43e77c..8a24540 100644
--- a/tools/test/scenarios/setup.xml
+++ b/tools/test/scenarios/setup.xml
@@ -27,11 +27,11 @@
                   requires="Install-${#}"/>
 
             <step name="Check-Logs-${#}" exec="onos-check-logs ${OC#}"
-                  requires="-Wait-for-Start-${#}"/>
+                  requires="~Wait-for-Start-${#}"/>
             <step name="Check-Components-${#}" exec="onos-check-components ${OC#}"
-                  requires="-Wait-for-Start-${#}"/>
+                  requires="~Wait-for-Start-${#}"/>
             <step name="Check-Apps-${#}" exec="onos-check-apps ${OC#}"
-                  requires="-Wait-for-Start-${#}"/>
+                  requires="~Wait-for-Start-${#}"/>
         </parallel>
     </group>
 </scenario>
diff --git a/tools/test/scenarios/smoke.xml b/tools/test/scenarios/smoke.xml
index 423f348..3161c21 100644
--- a/tools/test/scenarios/smoke.xml
+++ b/tools/test/scenarios/smoke.xml
@@ -15,6 +15,13 @@
   -->
 <scenario name="smoke-test" description="ONOS smoke test">
     <import file="${ONOS_ROOT}/tools/test/scenarios/prerequisites.xml"/>
+
     <import file="${ONOS_ROOT}/tools/test/scenarios/setup.xml"/>
     <dependency name="Setup" requires="Prerequisites"/>
+
+    <import file="${ONOS_ROOT}/tools/test/scenarios/archetypes.xml"/>
+    <dependency name="Archetypes" requires="Setup"/>
+
+    <import file="${ONOS_ROOT}/tools/test/scenarios/wrapup.xml"/>
+    <dependency name="Wrapup" requires="~Archetypes,Setup"/>
 </scenario>
diff --git a/tools/test/scenarios/wrapup.xml b/tools/test/scenarios/wrapup.xml
new file mode 100644
index 0000000..e46441d
--- /dev/null
+++ b/tools/test/scenarios/wrapup.xml
@@ -0,0 +1,24 @@
+<!--
+  ~ Copyright 2015 Open Networking Laboratory
+  ~
+  ~ 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="wrapup" description="ONOS test wrapup">
+    <group name="Wrapup">
+        <parallel var="${OC#}">
+            <step name="Final-Check-Logs-${#}" exec="onos-check-logs ${OC#}"/>
+            <step name="Fetch-Logs-${#}" exec="onos-fetch-logs ${OC#}"
+                  cwd="${WORKSPACE}/tmp/stc" requires="~^"/>
+        </parallel>
+    </group>
+</scenario>