change test order: set vPing first to avoid side effect from tempest or Rally Bench...
[releng.git] / jjb / functest / functest.yml
index 5036e9c..d2a5bc9 100644 (file)
 
     node: '{pod}'
 
+    parameters:
+        - project-parameter:
+            project: '{project}'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: master
+
     logrotate:
         daysToKeep: 30
         numToKeep: 10
     name: functest-all
     builders:
         - shell: |
+            #!/bin/bash
+            set +e
+
             echo "Functest: prepare Functest environment"
+            mkdir -p $HOME/functest/
             source $HOME/functest/opnfv-openrc.sh
-            python $HOME/functest/config_functest.py -d start
-            echo "Functest: run Functest suites"
-            python $HOME/.functest/Rally_test/run_rally.py -d all
-            python $HOME/.functest/Rally_test/run_rally.py -d tempest smoke
-            python $HOME/.functest/vPing/vPing.py -d
-            $HOME/.functest/ODL/start_tests.sh
+
+            # WORKSPACE is the root of the functest repo
+            # go into WORKSPACE where the functest repo is cloned
+            cd $WORKSPACE
+
+            # prepare
+            echo "Functest: prepare Functest environment"
+            python $WORKSPACE/testcases/config_functest.py --debug $WORKSPACE/ start
+
+            # vPing
+            echo "Functest: run vPing"
+            python $WORKSPACE/testcases/vPing/CI/libraries/vPing.py --debug $WORKSPACE/
+
+            # ODL
+            echo "Functest: run ODL suite"
+            $WORKSPACE/testcases/Controllers/ODL/CI/start_tests.sh
+
+            # tempest
+            echo "Functest: run Tempest suite"
+            rally verify start smoke
+            rally verify list
+
+            # rally
+            echo "Functest: run Functest Rally Bench suites"
+            python $WORKSPACE/testcases/VIM/OpenStack/CI/libraries/run_rally.py --debug $WORKSPACE/ all
+
+            # collect results
             echo "Functest: copy results and clean Functest environment"
             mkdir -p $HOME/functest/results
-            cp $HOME/.functest/Rally_test/results/* $HOME/functest/
-            python $HOME/functest/config_functest.py -d -f clean
 
+            # save tempest.conf for further troubleshooting
+            cp $HOME/.rally/tempest/for-deployment-*/tempest.conf $HOME/functest/results
+
+            # cleanup
+            python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean