cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aprat...@apache.org
Subject git commit: updated refs/heads/4.5 to e1a2128
Date Wed, 06 May 2015 03:20:20 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 21dd2ed9e -> e1a212842


CLOUDSTACK-8429: optimizing travis to run configurable set of tests only after configurable
runs


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e1a21284
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e1a21284
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e1a21284

Branch: refs/heads/4.5
Commit: e1a212842a9141df2d0e184607ca0faee359aec5
Parents: 21dd2ed
Author: Abhinandan Prateek <abhinandan.prateek@shapeblue.com>
Authored: Tue May 5 14:11:41 2015 +0530
Committer: Abhinandan Prateek <abhinandan.prateek@shapeblue.com>
Committed: Wed May 6 08:49:16 2015 +0530

----------------------------------------------------------------------
 .travis.yml                    | 31 ++++++++++++++++---------------
 tools/travis/after_script.sh   | 21 +++++++++++++++++++++
 tools/travis/before_install.sh | 20 ++++++++++++++++++++
 tools/travis/before_script.sh  | 18 +++++++++++++++++-
 tools/travis/install.sh        | 22 ++++++++++++++++++++--
 tools/travis/script.sh         | 28 +++++++++++++++++++++++++++-
 6 files changed, 121 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e1a21284/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index b757284..36122f8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,25 +24,26 @@ jdk:
 notifications:
   email: false
 env:
-- TESTS="smoke/test_affinity_groups smoke/test_deploy_vms_with_varied_deploymentplanners
smoke/test_disk_offerings smoke/test_global_settings"
-- TESTS="smoke/test_portable_publicip smoke/test_primary_storage smoke/test_privategw_acl
smoke/test_public_ip_range smoke/test_pvlan smoke/test_regions"
-- TESTS="smoke/test_reset_vm_on_reboot smoke/test_resource_detail smoke/test_routers smoke/test_guest_vlan_range
smoke/test_iso"
-- TESTS="smoke/test_secondary_storage smoke/test_service_offerings smoke/test_ssvm smoke/test_templates"
-- TESTS="smoke/test_multipleips_per_nic smoke/test_network smoke/test_non_contigiousvlan
smoke/test_over_provisioning"
-- TESTS="smoke/test_volumes smoke/test_vpc_vpn smoke/misc/test_deploy_vm smoke/test_vm_life_cycle
component/test_mm_max_limits"
-- TESTS="component/test_acl_isolatednetwork_delete component/test_mm_domain_limits component/test_acl_listsnapshot"
-- TESTS="component/test_acl_listvm component/test_acl_listvolume component/test_acl_sharednetwork_deployVM-impersonation
component/test_acl_sharednetwork"
-- TESTS="component/test_resource_limits component/test_snapshots component/test_usage component/test_volumes
component/test_vpc"
-- TESTS="component/test_vpc_network component/test_vpc_network_lbrules component/test_vpc_offerings"
+  global:
+     - REGRESSION_CYCLE=4
+     - REGRESSION_INDEX=6
+  matrix:
+    - TESTS="smoke/test_affinity_groups smoke/test_primary_storage"
+    - TESTS="smoke/test_deploy_vms_with_varied_deploymentplanners smoke/test_disk_offerings
smoke/test_global_settings smoke/test_multipleips_per_nic"
+    - TESTS="smoke/test_portable_publicip smoke/test_privategw_acl smoke/test_public_ip_range
smoke/test_pvlan smoke/test_regions smoke/test_network"
+    - TESTS="smoke/test_reset_vm_on_reboot smoke/test_resource_detail smoke/test_routers
smoke/test_guest_vlan_range smoke/test_iso smoke/test_non_contigiousvlan"
+    - TESTS="smoke/test_secondary_storage smoke/test_service_offerings smoke/test_ssvm smoke/test_templates
smoke/test_over_provisioning"
+
+    - TESTS="smoke/test_volumes smoke/test_vpc_vpn smoke/misc/test_deploy_vm smoke/test_vm_life_cycle
component/test_mm_max_limits"
+    - TESTS="component/test_acl_isolatednetwork_delete component/test_mm_domain_limits component/test_acl_listsnapshot"
+    - TESTS="component/test_acl_listvm component/test_acl_sharednetwork_deployVM-impersonation
component/test_acl_sharednetwork"
+    - TESTS="component/test_snapshots component/test_acl_listvolume"
 before_install: travis_wait 30 ./tools/travis/before_install.sh
 install: ./tools/travis/install.sh
 before_script: travis_wait 30 ./tools/travis/before_script.sh
 script:
-- mkdir -p integration-test-results/smoke/misc
-- mkdir -p integration-test-results/component
-- travis_wait 30 sleep 30
-- for suite in $TESTS; do travis_wait 30 nosetests --with-xunit --xunit-file=integration-test-results/$suite.xml
--with-marvin --marvin-config=setup/dev/advanced.cfg test/integration/$suite.py -s -a tags=advanced,required_hardware=false
--zone=Sandbox-simulator --hypervisor=simulator || true ; done
-- python ./tools/travis/xunit-reader.py integration-test-results/
+  - travis_wait 30 sleep 30
+  - ./tools/travis/script.sh $TESTS
 after_success: ./tools/travis/after_success.sh
 after_failure: ./tools/travis/after_failure.sh
 after_script: ./tools/travis/after_script.sh

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e1a21284/tools/travis/after_script.sh
----------------------------------------------------------------------
diff --git a/tools/travis/after_script.sh b/tools/travis/after_script.sh
index 17a9d53..828592d 100755
--- a/tools/travis/after_script.sh
+++ b/tools/travis/after_script.sh
@@ -19,4 +19,25 @@
 # This script should run any tear down commands required.
 #
 
+export TEST_JOB_NUMBER=`echo $TRAVIS_JOB_NUMBER | cut -d. -f1`
+export TEST_SEQUENCE_NUMBER=`echo $TRAVIS_JOB_NUMBER | cut -d. -f2`
+
+echo "REGRESSION_CYCLE=$REGRESSION_CYCLE"
+echo "TEST_JOB_NUMBER=$TEST_JOB_NUMBER"
+echo "TEST_SEQUENCE_NUMBER=$TEST_SEQUENCE_NUMBER"
+
+#run regression test only on $REGRESSION_CYCLE
+MOD=$(( $TEST_JOB_NUMBER % $REGRESSION_CYCLE ))
+
+echo "MOD=$MOD"
+
+if [ $MOD -ne 0 ]; then
+ if [ $TEST_SEQUENCE_NUMBER -ge $REGRESSION_INDEX ]; then
+   #skip test
+   echo "Skipping tests ... SUCCESS !"
+   exit 0
+ fi
+fi
+
+
 mvn -Dsimulator -pl client jetty:stop 2>&1

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e1a21284/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 249baed..31efc65 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -21,6 +21,26 @@
 # or internet downloads.
 #
 
+export TEST_JOB_NUMBER=`echo $TRAVIS_JOB_NUMBER | cut -d. -f1`
+export TEST_SEQUENCE_NUMBER=`echo $TRAVIS_JOB_NUMBER | cut -d. -f2`
+
+echo "REGRESSION_CYCLE=$REGRESSION_CYCLE"
+echo "TEST_JOB_NUMBER=$TEST_JOB_NUMBER"
+echo "TEST_SEQUENCE_NUMBER=$TEST_SEQUENCE_NUMBER"
+
+#run regression test only on $REGRESSION_CYCLE
+MOD=$(( $TEST_JOB_NUMBER % $REGRESSION_CYCLE ))
+
+echo "MOD=$MOD"
+
+if [ $MOD -ne 0 ]; then
+ if [ $TEST_SEQUENCE_NUMBER -ge $REGRESSION_INDEX ]; then
+   #skip test
+   echo "Skipping tests ... SUCCESS !"
+   exit 0
+ fi
+fi
+
 echo -e "#### System Information ####"
 
 echo -e "\nJava Version: "

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e1a21284/tools/travis/before_script.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_script.sh b/tools/travis/before_script.sh
index 1d17769..cba50e0 100755
--- a/tools/travis/before_script.sh
+++ b/tools/travis/before_script.sh
@@ -19,6 +19,22 @@
 # This script should be used to bring up the environment.
 #
 
+
+export TEST_JOB_NUMBER=`echo $TRAVIS_JOB_NUMBER | cut -d. -f1`
+export TEST_SEQUENCE_NUMBER=`echo $TRAVIS_JOB_NUMBER | cut -d. -f2`
+
+#run regression test only on $REGRESSION_CYCLE
+MOD=$(( $TEST_JOB_NUMBER % $REGRESSION_CYCLE ))
+
+if [ $MOD -ne 0 ]; then
+ if [ $TEST_SEQUENCE_NUMBER -ge $REGRESSION_INDEX ]; then
+   #skip test
+   echo "Skipping tests ... SUCCESS !"
+   exit 0
+ fi
+fi
+
+
 export CATALINA_BASE=/opt/tomcat
 export CATALINA_HOME=/opt/tomcat
 export M2_HOME="/usr/local/maven-3.2.1/"
@@ -27,4 +43,4 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m"
 mvn -Dsimulator -pl :cloud-client-ui jetty:run 2>&1 > /dev/null &
 
 while ! nc -vz localhost 8096 2>&1 > /dev/null; do sleep 10; done
-python -m marvin.deployDataCenter -i setup/dev/advanced.cfg 2>&1 || true
\ No newline at end of file
+python -m marvin.deployDataCenter -i setup/dev/advanced.cfg 2>&1 || true

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e1a21284/tools/travis/install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/install.sh b/tools/travis/install.sh
index 4082e73..ea89cd7 100755
--- a/tools/travis/install.sh
+++ b/tools/travis/install.sh
@@ -19,13 +19,31 @@
 # This should be used to create the build.
 #
 
+
+export TEST_JOB_NUMBER=`echo $TRAVIS_JOB_NUMBER | cut -d. -f1`
+export TEST_SEQUENCE_NUMBER=`echo $TRAVIS_JOB_NUMBER | cut -d. -f2`
+
+#run regression test only on $REGRESSION_CYCLE
+MOD=$(( $TEST_JOB_NUMBER % $REGRESSION_CYCLE ))
+
+if [ $MOD -ne 0 ]; then
+ if [ $TEST_SEQUENCE_NUMBER -ge $REGRESSION_INDEX ]; then
+   #skip test
+   echo "Skipping tests ... SUCCESS !"
+   exit 0
+ fi
+fi
+
 export CATALINA_BASE=/opt/tomcat
 export CATALINA_HOME=/opt/tomcat
 export M2_HOME="/usr/local/maven-3.2.1/"
 export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m"
 
-# Compile Cloudstack
-mvn -q -Pimpatient -Dsimulator clean install -DskipTests=true
+if [ $TEST_SEQUENCE_NUMBER -eq 1 ]; then
+   mvn -q -Pimpatient -Dsimulator clean install
+else
+   mvn -q -Pimpatient -Dsimulator clean install -DskipTests=true
+fi
 
 # Compile API Docs
 cd tools/apidoc

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e1a21284/tools/travis/script.sh
----------------------------------------------------------------------
diff --git a/tools/travis/script.sh b/tools/travis/script.sh
index 44a55a9..e1c75bb 100755
--- a/tools/travis/script.sh
+++ b/tools/travis/script.sh
@@ -18,4 +18,30 @@
 #
 # This script should be responsible for bring up the
 # test environment and executing the tests.
-#
\ No newline at end of file
+#
+
+export TEST_JOB_NUMBER=`echo $TRAVIS_JOB_NUMBER | cut -d. -f1`
+export TEST_SEQUENCE_NUMBER=`echo $TRAVIS_JOB_NUMBER | cut -d. -f2`
+
+#run regression test only on $REGRESSION_CYCLE
+MOD=$(( $TEST_JOB_NUMBER % $REGRESSION_CYCLE ))
+
+if [ $MOD -ne 0 ]; then
+ if [ $TEST_SEQUENCE_NUMBER -ge $REGRESSION_INDEX ]; then
+   #skip test
+   echo "Skipping tests ... SUCCESS !"
+   exit 0
+ fi
+fi
+
+mkdir -p integration-test-results/smoke/misc
+mkdir -p integration-test-results/component
+
+
+for suite in $1; do
+  travis_wait 30
+  nosetests --with-xunit --xunit-file=integration-test-results/$suite.xml --with-marvin --marvin-config=setup/dev/advanced.cfg
test/integration/$suite.py -s -a tags=advanced,required_hardware=false --zone=Sandbox-simulator
--hypervisor=simulator || true ;
+done
+
+
+python ./tools/travis/xunit-reader.py integration-test-results/


Mime
View raw message