You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2016/03/26 13:13:10 UTC
[2/2] git commit: updated refs/heads/4.9-mvn-upgrade to 729910f
travis: Fix simulator tests and optimize default global configs
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/729910f9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/729910f9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/729910f9
Branch: refs/heads/4.9-mvn-upgrade
Commit: 729910f9fc8cd186e01cc56c1d890a8fad2acc43
Parents: ecb11c8
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Sat Mar 26 02:44:40 2016 +0100
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Sat Mar 26 13:12:25 2016 +0100
----------------------------------------------------------------------
developer/developer-prefill.sql | 28 ++++++++++++++++++++++++++++
setup/db/templates.simulator.sql | 4 +++-
setup/dev/advanced.cfg | 4 ++--
tools/travis/before_install.sh | 5 ++++-
tools/travis/install.sh | 19 ++++++++-----------
tools/travis/script.sh | 4 +++-
tools/travis/xunit-reader.py | 14 ++++++++++++--
7 files changed, 60 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/729910f9/developer/developer-prefill.sql
----------------------------------------------------------------------
diff --git a/developer/developer-prefill.sql b/developer/developer-prefill.sql
index 3097203..f874118 100644
--- a/developer/developer-prefill.sql
+++ b/developer/developer-prefill.sql
@@ -64,6 +64,10 @@ INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
VALUES ('Advanced', 'DEFAULT', 'management-server',
+ 'expunge.workers', '3');
+
+INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
+ VALUES ('Advanced', 'DEFAULT', 'management-server',
'cluster.cpu.allocated.capacity.disablethreshold', '0.95');
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
@@ -78,6 +82,30 @@ INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
VALUES ('Advanced', 'DEFAULT', 'management-server',
'pool.storage.capacity.disablethreshold', '0.95');
+INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
+ VALUES ('Advanced', 'DEFAULT', 'management-server',
+ 'network.gc.wait', '60');
+
+INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
+ VALUES ('Advanced', 'DEFAULT', 'management-server',
+ 'network.gc.interval', '60');
+
+INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
+ VALUES ('Advanced', 'DEFAULT', 'management-server',
+ 'storage.cleanup.interval', '150');
+
+INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
+ VALUES ('Advanced', 'DEFAULT', 'management-server',
+ 'vm.op.wait.interval', '5');
+
+INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
+ VALUES ('Advanced', 'DEFAULT', 'management-server',
+ 'workers', '10');
+
+INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
+ VALUES ('Advanced', 'DEFAULT', 'management-server',
+ 'direct.agent.load.size', '1000');
+
-- Add developer configuration entry; allows management server to be run as a user other than "cloud"
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
VALUES ('Advanced', 'DEFAULT', 'management-server',
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/729910f9/setup/db/templates.simulator.sql
----------------------------------------------------------------------
diff --git a/setup/db/templates.simulator.sql b/setup/db/templates.simulator.sql
index 25e91bd..ac09c05 100755
--- a/setup/db/templates.simulator.sql
+++ b/setup/db/templates.simulator.sql
@@ -19,4 +19,6 @@
INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, state)
VALUES (100, UUID(), 'simulator-domR', 'SystemVM Template (simulator)', 0, now(), 'SYSTEM', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/routing/debian/latest/systemvm.vhd.bz2', '', 0, 'SystemVM Template (simulator)', 'VHD', 15, 0, 1, 'Simulator','Active');
INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type,state)
- VALUES (111, UUID(), 'simulator-Centos', 'CentOS 5.3(64-bit) no GUI (Simulator)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2', '', 0, 'CentOS 5.3(64-bit) no GUI (Simulator)', 'VHD', 11, 1, 1, 'Simulator','Active');
+ VALUES (111, UUID(), 'simulator-Centos', 'CentOS 5.6 (64-bit) no GUI (Simulator)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2', '', 0, 'CentOS 5.6 (64-bit) no GUI (Simulator)', 'VHD', 142, 1, 1, 'Simulator','Active');
+
+INSERT INTO `cloud`.`template_store_ref` VALUES (1,1,111,NOW(),NOW(),NULL,100,0,'Image',0,'DOWNLOADED',NULL,NULL,'template/tmpl/1/111/','http://fake.cloud/111.vhd.bz2','Ready',0,0,0,0,NULL,NULL,NULL);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/729910f9/setup/dev/advanced.cfg
----------------------------------------------------------------------
diff --git a/setup/dev/advanced.cfg b/setup/dev/advanced.cfg
index 8109bb1..afb9b6a 100644
--- a/setup/dev/advanced.cfg
+++ b/setup/dev/advanced.cfg
@@ -154,7 +154,7 @@
},
{
"name": "storage.cleanup.interval",
- "value": "300"
+ "value": "150"
},
{
"name": "vm.op.wait.interval",
@@ -178,7 +178,7 @@
},
{
"name": "account.cleanup.interval",
- "value": "600"
+ "value": "60"
},
{
"name": "guest.domain.suffix",
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/729910f9/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index b90a099..e822006 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -55,6 +55,9 @@ df
echo -e "\nMemory Status: "
free
+echo -e "\nTotal CPUs: "
+nproc
+
echo -e "\nCheck Git status"
git status
@@ -96,7 +99,7 @@ echo -e "\nInstalling some python packages: "
for ((i=0;i<$RETRY_COUNT;i++))
do
- sudo pip install --upgrade lxml texttable paramiko > /tmp/piplog
+ sudo pip install --upgrade lxml texttable paramiko nose pip > /tmp/piplog
if [[ $? -eq 0 ]]; then
echo -e "\npython packages installed successfully"
break;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/729910f9/tools/travis/install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/install.sh b/tools/travis/install.sh
index 28f4ed4..2087fe7 100755
--- a/tools/travis/install.sh
+++ b/tools/travis/install.sh
@@ -37,21 +37,18 @@ fi
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m -Djava.security.egd=file:/dev/./urandom"
if [ $TEST_SEQUENCE_NUMBER -eq 1 ]; then
- mvn -q -Pimpatient -Dsimulator clean install
+ mvn -Pdeveloper,systemvm -Dsimulator clean install -T4 -l build.log
else
- mvn -q -Pimpatient -Dsimulator clean install -DskipTests=true
+ mvn -Pimpatient -Dsimulator clean install -DskipTests=true -l build.log
fi
-# Compile API Docs
-cd tools/apidoc
-mvn -q clean install
-cd ../../
+tail -n 200 build.log || true
-# Compile marvin
-cd tools/marvin
-mvn -q clean install
-sudo python setup.py install 2>&1 > /dev/null
-cd ../../
+# install mysql-connector-python
+sudo -H pip install --upgrade http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.4.zip#md5=3df394d89300db95163f17c843ef49df 2>&1 > /dev/null
+
+# Install marvin
+sudo -H pip install --upgrade tools/marvin/dist/Marvin-*.tar.gz > /dev/null
# Deploy the database
mvn -q -Pdeveloper -pl developer -Ddeploydb
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/729910f9/tools/travis/script.sh
----------------------------------------------------------------------
diff --git a/tools/travis/script.sh b/tools/travis/script.sh
index 7e7c497..8abf7ed 100755
--- a/tools/travis/script.sh
+++ b/tools/travis/script.sh
@@ -37,8 +37,10 @@ fi
mkdir -p integration-test-results/smoke/misc
mkdir -p integration-test-results/component
+TESTS=($1)
+echo "Running tests: " ${TESTS[@]}
-for suite in $1; do
+for suite in "${TESTS[@]}" ; do
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
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/729910f9/tools/travis/xunit-reader.py
----------------------------------------------------------------------
diff --git a/tools/travis/xunit-reader.py b/tools/travis/xunit-reader.py
index c492c01..80e228b 100755
--- a/tools/travis/xunit-reader.py
+++ b/tools/travis/xunit-reader.py
@@ -61,6 +61,8 @@ def _generate_args():
def _generate_file_list(args):
path = args.pop('path')
file_path_list = []
+ if path.endswith('.xml') and os.path.isfile(path):
+ file_path_list.append(path)
for (root, dirnames, filenames) in os.walk(path):
for filename in filenames:
if filename.endswith('.xml'):
@@ -71,7 +73,7 @@ def _generate_file_list(args):
def parse_reports(file_path_list):
table = texttable.Texttable()
- table.header(['Test', 'Result'])
+ table.header(['Test', 'Result', 'Time'])
exit_code = 0
@@ -80,16 +82,24 @@ def parse_reports(file_path_list):
for event, elem in data:
name = ''
status = 'Success'
+ time = ''
if 'name' in elem.attrib:
name = elem.attrib['name']
+ if 'time' in elem.attrib:
+ time = elem.attrib['time']
for children in elem.getchildren():
if 'skipped' == children.tag:
status = 'Skipped'
elif 'failure' == children.tag:
exit_code = 1
status = 'Failure'
+ elif 'error' == children.tag:
+ exit_code = 1
+ status = 'Error'
+ if 'type' in children.attrib:
+ status = children.attrib['type']
- table.add_row([name, status])
+ table.add_row([name, status, time])
print table.draw()