Add tag support to boostrap-verify-perf 76/676/5
authorpmikus <pmikus@cisco.com>
Mon, 4 Apr 2016 13:26:41 +0000 (15:26 +0200)
committerGerrit Code Review <gerrit@fd.io>
Tue, 5 Apr 2016 14:22:01 +0000 (14:22 +0000)
- support tags in vpp-verify-perfomance-* jenkins jobs

Change-Id: I7e3abfe9e552a3f2fa9ebf95df9b48bcbae3561a
Signed-off-by: pmikus <pmikus@cisco.com>
bootstrap-verify-perf.sh
resources/tools/topo_installation.py

index 746d1a0..c162408 100755 (executable)
@@ -76,7 +76,15 @@ function cancel_reservation {
 # On script exit we cancel the reservation and delete all vpp packages
 trap "cancel_reservation ${WORKING_TOPOLOGY}" EXIT
 
-# run performance test suite
-pybot -L TRACE \
-    -v TOPOLOGY_PATH:${WORKING_TOPOLOGY} \
-    -s performance tests/
+
+if [ ! -z "$TEST_TAG" ]; then
+# run specific performance tests by tag if variable is set
+    pybot -L TRACE \
+        -v TOPOLOGY_PATH:${WORKING_TOPOLOGY} \
+        -i $TEST_TAG tests/
+else
+# run full performance test suite
+    pybot -L TRACE \
+        -v TOPOLOGY_PATH:${WORKING_TOPOLOGY} \
+        -s performance tests/
+fi
index 7fb60ac..660fb3b 100755 (executable)
@@ -23,6 +23,8 @@ from yaml import load
 from resources.libraries.python.ssh import SSH
 
 def main():
+    """Copy and installation of VPP packages."""
+
     parser = argparse.ArgumentParser()
     parser.add_argument("-t", "--topo", required=True,
                         help="Topology file")
@@ -45,12 +47,13 @@ def main():
 
             # Copy packages from local path to installation dir
             for deb in packages:
-                ssh.scp(local_path=deb,remote_path=install_dir)
+                ssh.scp(local_path=deb, remote_path=install_dir)
 
             # Installation of VPP deb packages
-            ret, _, err = ssh.exec_command("dpkg -i {}*.deb".format(install_dir))
+            ret, _, err = ssh.exec_command_sudo(
+                "dpkg -i {}*.deb".format(install_dir))
             if ret != 0:
-                print("Installation unsuccessful:\n{}".format(err))
+                print "Installation unsuccessful:\n{}".format(err)
                 return ret
 
 if __name__ == "__main__":