mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-9584: run component tests in Travis run
This would run additional component tests in Travis run Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
f78e946349
commit
7a96d32c7e
134
.travis.yml
134
.travis.yml
@ -17,9 +17,6 @@
|
|||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
dist: trusty
|
||||||
language: java
|
language: java
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.cache
|
|
||||||
jdk:
|
jdk:
|
||||||
- oraclejdk7
|
- oraclejdk7
|
||||||
python:
|
python:
|
||||||
@ -27,31 +24,134 @@ python:
|
|||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.m2
|
- $HOME/.m2
|
||||||
timeout: 1000
|
timeout: 500
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- REGRESSION_CYCLE=4
|
|
||||||
- REGRESSION_INDEX=6
|
|
||||||
- PATH=$HOME/.local/bin:$PATH
|
- PATH=$HOME/.local/bin:$PATH
|
||||||
matrix:
|
matrix:
|
||||||
- TESTS="smoke/test_affinity_groups smoke/test_affinity_groups_projects smoke/test_dynamicroles smoke/test_deploy_vgpu_enabled_vm smoke/test_deploy_vm_iso smoke/test_deploy_vm_root_resize smoke/test_deploy_vm_with_userdata smoke/test_deploy_vms_with_varied_deploymentplanners smoke/test_disk_offerings smoke/test_global_settings smoke/test_guest_vlan_range"
|
- TESTS="smoke/test_affinity_groups
|
||||||
- TESTS="smoke/test_hosts smoke/test_internal_lb smoke/test_iso smoke/test_list_ids_parameter smoke/test_loadbalance smoke/test_login smoke/test_multipleips_per_nic smoke/test_network smoke/test_network_acl smoke/test_nic smoke/test_nic_adapter_type smoke/test_non_contigiousvlan"
|
smoke/test_affinity_groups_projects
|
||||||
- TESTS="smoke/test_outofbandmanagement smoke/test_over_provisioning smoke/test_password_server smoke/test_portable_publicip smoke/test_primary_storage smoke/test_privategw_acl smoke/test_public_ip_range smoke/test_pvlan smoke/test_regions smoke/test_reset_vm_on_reboot smoke/test_resource_detail"
|
smoke/test_deploy_vgpu_enabled_vm
|
||||||
- TESTS="smoke/test_router_dhcphosts smoke/test_routers smoke/test_routers_iptables_default_policy smoke/test_routers_network_ops smoke/test_staticroles smoke/test_scale_vm smoke/test_secondary_storage smoke/test_service_offerings smoke/test_snapshots smoke/test_ssvm smoke/test_templates"
|
smoke/test_deploy_vm_iso
|
||||||
- TESTS="smoke/test_usage_events smoke/test_vm_life_cycle smoke/test_vm_snapshots smoke/test_volumes smoke/test_vpc_redundant smoke/test_vpc_router_nics smoke/test_vpc_vpn smoke/misc/test_deploy_vm smoke/misc/test_vm_ha smoke/misc/test_escalations_templates smoke/misc/test_vm_sync"
|
smoke/test_deploy_vm_root_resize
|
||||||
|
smoke/test_deploy_vm_with_userdata
|
||||||
|
smoke/test_deploy_vms_with_varied_deploymentplanners
|
||||||
|
smoke/test_disk_offerings
|
||||||
|
smoke/test_dynamicroles
|
||||||
|
smoke/test_global_settings
|
||||||
|
smoke/test_guest_vlan_range
|
||||||
|
smoke/test_hosts
|
||||||
|
smoke/test_internal_lb
|
||||||
|
smoke/test_iso
|
||||||
|
smoke/test_list_ids_parameter
|
||||||
|
smoke/test_loadbalance
|
||||||
|
smoke/test_login
|
||||||
|
smoke/test_multipleips_per_nic
|
||||||
|
smoke/test_network
|
||||||
|
smoke/test_network_acl
|
||||||
|
smoke/test_nic
|
||||||
|
smoke/test_nic_adapter_type
|
||||||
|
smoke/test_non_contigiousvlan"
|
||||||
|
|
||||||
|
- TESTS="smoke/test_outofbandmanagement
|
||||||
|
smoke/test_over_provisioning
|
||||||
|
smoke/test_password_server
|
||||||
|
smoke/test_portable_publicip
|
||||||
|
smoke/test_primary_storage
|
||||||
|
smoke/test_privategw_acl
|
||||||
|
smoke/test_public_ip_range
|
||||||
|
smoke/test_pvlan
|
||||||
|
smoke/test_regions
|
||||||
|
smoke/test_reset_vm_on_reboot
|
||||||
|
smoke/test_resource_detail
|
||||||
|
smoke/test_router_dhcphosts
|
||||||
|
smoke/test_router_dns
|
||||||
|
smoke/test_routers
|
||||||
|
smoke/test_routers_iptables_default_policy
|
||||||
|
smoke/test_routers_network_ops
|
||||||
|
smoke/test_scale_vm
|
||||||
|
smoke/test_secondary_storage
|
||||||
|
smoke/test_service_offerings
|
||||||
|
smoke/test_snapshots
|
||||||
|
smoke/test_ssvm
|
||||||
|
smoke/test_staticroles
|
||||||
|
smoke/test_templates
|
||||||
|
smoke/test_usage_events
|
||||||
|
smoke/test_vm_life_cycle
|
||||||
|
smoke/test_vm_snapshots
|
||||||
|
smoke/test_volumes
|
||||||
|
smoke/test_vpc_redundant
|
||||||
|
smoke/test_vpc_router_nics
|
||||||
|
smoke/test_vpc_vpn
|
||||||
|
smoke/misc/test_deploy_vm
|
||||||
|
smoke/misc/test_escalations_templates
|
||||||
|
smoke/misc/test_vm_ha
|
||||||
|
smoke/misc/test_vm_sync"
|
||||||
|
|
||||||
|
- TESTS="component/find_hosts_for_migration
|
||||||
|
component/test_acl_isolatednetwork_delete
|
||||||
|
component/test_acl_listsnapshot
|
||||||
|
component/test_acl_listvm
|
||||||
|
component/test_acl_listvolume
|
||||||
|
component/test_acl_sharednetwork
|
||||||
|
component/test_acl_sharednetwork_deployVM-impersonation"
|
||||||
|
component/test_cpu_limits"
|
||||||
|
|
||||||
|
- TESTS="component/test_cpu_max_limits
|
||||||
|
component/test_cpu_project_limits
|
||||||
|
component/test_deploy_vm_userdata_multi_nic
|
||||||
|
component/test_egress_fw_rules
|
||||||
|
component/test_invalid_gw_nm
|
||||||
|
component/test_ip_reservation
|
||||||
|
component/test_lb_secondary_ip"
|
||||||
|
|
||||||
|
- TESTS="component/test_memory_limits
|
||||||
|
component/test_mm_domain_limits
|
||||||
|
component/test_mm_max_limits
|
||||||
|
component/test_mm_project_limits
|
||||||
|
component/test_network_offering
|
||||||
|
component/test_non_contiguous_vlan
|
||||||
|
component/test_persistent_networks"
|
||||||
|
|
||||||
|
- TESTS="component/test_projects
|
||||||
|
component/test_project_configs
|
||||||
|
component/test_project_limits
|
||||||
|
component/test_project_usage
|
||||||
|
component/test_regions
|
||||||
|
component/test_regions_accounts
|
||||||
|
component/test_routers
|
||||||
|
component/test_snapshots"
|
||||||
|
|
||||||
|
- TESTS="component/test_resource_limits"
|
||||||
|
|
||||||
|
- TESTS="component/test_stopped_vm
|
||||||
|
component/test_tags
|
||||||
|
component/test_templates
|
||||||
|
component/test_update_vm
|
||||||
|
component/test_usage"
|
||||||
|
|
||||||
|
- TESTS="component/test_volumes
|
||||||
|
component/test_vpc_network
|
||||||
|
component/test_vpc_offerings
|
||||||
|
component/test_vpn_users"
|
||||||
|
|
||||||
|
# FIXME: fix following tests and include them in Travis
|
||||||
|
# - TESTS="component/test_affinity_groups_projects"
|
||||||
|
# - TESTS="component/test_allocation_states"
|
||||||
|
# - TESTS="component/test_vpc"
|
||||||
|
# - TESTS="component/test_project_resources"
|
||||||
|
# - TESTS="component/test_cpu_domain_limits"
|
||||||
|
# - TESTS="component/test_acl_isolatednetwork"
|
||||||
|
# - TESTS="component/test_accounts"
|
||||||
|
# - TESTS="component/test_organization_states"
|
||||||
|
|
||||||
- TESTS="component/test_mm_max_limits component/test_acl_isolatednetwork_delete"
|
|
||||||
- TESTS="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
|
before_install: travis_wait 30 ./tools/travis/before_install.sh
|
||||||
install: ./tools/travis/install.sh
|
install: ./tools/travis/install.sh
|
||||||
before_script: travis_wait 30 ./tools/travis/before_script.sh
|
before_script: travis_wait 30 ./tools/travis/before_script.sh
|
||||||
script:
|
script:
|
||||||
- travis_wait 30 sleep 30
|
- travis_wait 40 ./tools/travis/script.sh ${TESTS}
|
||||||
- ./tools/travis/script.sh ${TESTS}
|
|
||||||
after_success: ./tools/travis/after_success.sh
|
after_success: ./tools/travis/after_success.sh
|
||||||
after_failure: ./tools/travis/after_failure.sh
|
after_failure: ./tools/travis/after_failure.sh
|
||||||
after_script: ./tools/travis/after_script.sh
|
after_script: ./tools/travis/after_script.sh
|
||||||
|
|||||||
@ -52,15 +52,15 @@ INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
|||||||
|
|
||||||
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
||||||
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
||||||
'account.cleanup.interval', '60');
|
'account.cleanup.interval', '20');
|
||||||
|
|
||||||
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
||||||
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
||||||
'expunge.delay', '60');
|
'expunge.delay', '20');
|
||||||
|
|
||||||
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
||||||
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
||||||
'expunge.interval', '60');
|
'expunge.interval', '20');
|
||||||
|
|
||||||
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
||||||
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
||||||
@ -84,15 +84,15 @@ INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
|||||||
|
|
||||||
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
||||||
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
||||||
'network.gc.wait', '60');
|
'network.gc.wait', '20');
|
||||||
|
|
||||||
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
||||||
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
||||||
'network.gc.interval', '60');
|
'network.gc.interval', '20');
|
||||||
|
|
||||||
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
||||||
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
||||||
'storage.cleanup.interval', '150');
|
'storage.cleanup.interval', '40');
|
||||||
|
|
||||||
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
||||||
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
VALUES ('Advanced', 'DEFAULT', 'management-server',
|
||||||
|
|||||||
@ -150,11 +150,11 @@
|
|||||||
"globalConfig": [
|
"globalConfig": [
|
||||||
{
|
{
|
||||||
"name": "network.gc.wait",
|
"name": "network.gc.wait",
|
||||||
"value": "60"
|
"value": "20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "storage.cleanup.interval",
|
"name": "storage.cleanup.interval",
|
||||||
"value": "60"
|
"value": "40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vm.op.wait.interval",
|
"name": "vm.op.wait.interval",
|
||||||
@ -166,7 +166,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "network.gc.interval",
|
"name": "network.gc.interval",
|
||||||
"value": "60"
|
"value": "20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "instance.name",
|
"name": "instance.name",
|
||||||
@ -178,7 +178,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "account.cleanup.interval",
|
"name": "account.cleanup.interval",
|
||||||
"value": "60"
|
"value": "20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guest.domain.suffix",
|
"name": "guest.domain.suffix",
|
||||||
@ -186,7 +186,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "expunge.delay",
|
"name": "expunge.delay",
|
||||||
"value": "60"
|
"value": "20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vm.allocation.algorithm",
|
"name": "vm.allocation.algorithm",
|
||||||
@ -194,7 +194,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "expunge.interval",
|
"name": "expunge.interval",
|
||||||
"value": "60"
|
"value": "20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "expunge.workers",
|
"name": "expunge.workers",
|
||||||
|
|||||||
@ -38,24 +38,48 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
""" Test cases for out of band management
|
""" Test cases for out of band management
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def setUp(self):
|
@classmethod
|
||||||
self.apiclient = self.testClient.getApiClient()
|
def setUpClass(cls):
|
||||||
self.hypervisor = self.testClient.getHypervisorInfo()
|
testClient = super(TestOutOfBandManagement, cls).getClsTestClient()
|
||||||
self.dbclient = self.testClient.getDbConnection()
|
cls.apiclient = testClient.getApiClient()
|
||||||
self.services = self.testClient.getParsedTestDataConfig()
|
cls.services = testClient.getParsedTestDataConfig()
|
||||||
self.mgtSvrDetails = self.config.__dict__["mgtSvr"][0].__dict__
|
cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
|
||||||
self.fakeMsId = random.randint(10000, 99999) * random.randint(10, 20)
|
cls.host = None
|
||||||
|
cls.cleanup = []
|
||||||
self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
|
|
||||||
self.host = None
|
|
||||||
self.server = None
|
|
||||||
|
|
||||||
# use random port for ipmisim
|
# use random port for ipmisim
|
||||||
s = socket.socket()
|
s = socket.socket()
|
||||||
s.bind(('', 0))
|
s.bind(('', 0))
|
||||||
self.serverPort = s.getsockname()[1]
|
cls.serverPort = s.getsockname()[1]
|
||||||
s.close()
|
s.close()
|
||||||
|
|
||||||
|
def startIpmiServer(tname, server):
|
||||||
|
try:
|
||||||
|
server.serve_forever()
|
||||||
|
except Exception: pass
|
||||||
|
IpmiServerContext('reset')
|
||||||
|
ThreadedIpmiServer.allow_reuse_address = True
|
||||||
|
server = ThreadedIpmiServer(('0.0.0.0', cls.serverPort), IpmiServer)
|
||||||
|
thread.start_new_thread(startIpmiServer, ("ipmi-server", server,))
|
||||||
|
cls.server = server
|
||||||
|
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def tearDownClass(cls):
|
||||||
|
try:
|
||||||
|
cleanup_resources(cls.apiclient, cls.cleanup)
|
||||||
|
cls.server.shutdown()
|
||||||
|
cls.server.server_close()
|
||||||
|
IpmiServerContext('reset')
|
||||||
|
except Exception as e:
|
||||||
|
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||||
|
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
self.apiclient = self.testClient.getApiClient()
|
||||||
|
self.dbclient = self.testClient.getDbConnection()
|
||||||
|
self.mgtSvrDetails = self.config.__dict__["mgtSvr"][0].__dict__
|
||||||
|
self.fakeMsId = random.randint(10000, 99999) * random.randint(10, 20)
|
||||||
self.cleanup = []
|
self.cleanup = []
|
||||||
|
|
||||||
|
|
||||||
@ -67,10 +91,6 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
self.dbclient.execute("delete from cluster_details where name='outOfBandManagementEnabled'")
|
self.dbclient.execute("delete from cluster_details where name='outOfBandManagementEnabled'")
|
||||||
self.dbclient.execute("delete from data_center_details where name='outOfBandManagementEnabled'")
|
self.dbclient.execute("delete from data_center_details where name='outOfBandManagementEnabled'")
|
||||||
cleanup_resources(self.apiclient, self.cleanup)
|
cleanup_resources(self.apiclient, self.cleanup)
|
||||||
if self.server:
|
|
||||||
self.server.shutdown()
|
|
||||||
self.server.server_close()
|
|
||||||
IpmiServerContext('reset')
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise Exception("Warning: Exception during cleanup : %s" % e)
|
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||||
|
|
||||||
@ -145,31 +165,28 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
if timeout:
|
if timeout:
|
||||||
cmd.timeout = timeout
|
cmd.timeout = timeout
|
||||||
|
|
||||||
try:
|
tries = 3
|
||||||
return self.apiclient.issueOutOfBandManagementPowerAction(cmd)
|
while tries > 0:
|
||||||
except Exception as e:
|
tries -= 1
|
||||||
if "packet session id 0x0 does not match active session" in str(e):
|
try:
|
||||||
raise self.skipTest("Known ipmitool issue hit, skipping test")
|
return self.apiclient.issueOutOfBandManagementPowerAction(cmd)
|
||||||
raise e
|
except Exception as e:
|
||||||
|
if tries <= 0:
|
||||||
|
if "packet session id 0x0 does not match active session" in str(e):
|
||||||
|
raise self.skipTest("Known ipmitool issue hit, skipping test")
|
||||||
|
raise e
|
||||||
|
|
||||||
|
|
||||||
def configureAndEnableOobm(self):
|
def configureAndEnableOobm(self, power_state=None):
|
||||||
|
"""
|
||||||
|
Setup ipmisim and enable out-of-band management for host
|
||||||
|
"""
|
||||||
self.apiclient.configureOutOfBandManagement(self.getOobmConfigCmd())
|
self.apiclient.configureOutOfBandManagement(self.getOobmConfigCmd())
|
||||||
response = self.apiclient.enableOutOfBandManagementForHost(self.getOobmEnableCmd())
|
response = self.apiclient.enableOutOfBandManagementForHost(self.getOobmEnableCmd())
|
||||||
self.assertEqual(response.enabled, True)
|
self.assertEqual(response.enabled, True)
|
||||||
|
if power_state:
|
||||||
|
bmc = IpmiServerContext().bmc
|
||||||
def startIpmiServer(self):
|
bmc.powerstate = power_state
|
||||||
def startIpmiServer(tname, server):
|
|
||||||
self.debug("Starting ipmisim server")
|
|
||||||
try:
|
|
||||||
server.serve_forever()
|
|
||||||
except Exception: pass
|
|
||||||
IpmiServerContext('reset')
|
|
||||||
ThreadedIpmiServer.allow_reuse_address = False
|
|
||||||
server = ThreadedIpmiServer(('0.0.0.0', self.getIpmiServerPort()), IpmiServer)
|
|
||||||
thread.start_new_thread(startIpmiServer, ("ipmi-server", server,))
|
|
||||||
self.server = server
|
|
||||||
|
|
||||||
|
|
||||||
def checkSyncToState(self, state, interval):
|
def checkSyncToState(self, state, interval):
|
||||||
@ -178,7 +195,7 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
return response.powerstate == expectedState, None
|
return response.powerstate == expectedState, None
|
||||||
|
|
||||||
sync_interval = 1 + int(interval)/1000
|
sync_interval = 1 + int(interval)/1000
|
||||||
res, _ = wait_until(sync_interval, 10, checkForStateSync, state)
|
res, _ = wait_until(sync_interval, 20, checkForStateSync, state)
|
||||||
if not res:
|
if not res:
|
||||||
self.fail("Failed to get host.powerstate synced to expected state:" + state)
|
self.fail("Failed to get host.powerstate synced to expected state:" + state)
|
||||||
response = self.getHost(hostId=self.getHost().id).outofbandmanagement
|
response = self.getHost(hostId=self.getHost().id).outofbandmanagement
|
||||||
@ -301,7 +318,6 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
and zone level sequentially Zone > Cluster > Host
|
and zone level sequentially Zone > Cluster > Host
|
||||||
"""
|
"""
|
||||||
self.configureAndEnableOobm()
|
self.configureAndEnableOobm()
|
||||||
self.startIpmiServer()
|
|
||||||
bmc = IpmiServerContext().bmc
|
bmc = IpmiServerContext().bmc
|
||||||
bmc.powerstate = 'off'
|
bmc.powerstate = 'off'
|
||||||
|
|
||||||
@ -366,17 +382,6 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
self.assertEqual(response.powerstate, 'Off')
|
self.assertEqual(response.powerstate, 'Off')
|
||||||
|
|
||||||
|
|
||||||
def configureAndStartIpmiServer(self, power_state=None):
|
|
||||||
"""
|
|
||||||
Setup ipmisim and enable out-of-band management for host
|
|
||||||
"""
|
|
||||||
self.configureAndEnableOobm()
|
|
||||||
self.startIpmiServer()
|
|
||||||
if power_state:
|
|
||||||
bmc = IpmiServerContext().bmc
|
|
||||||
bmc.powerstate = power_state
|
|
||||||
|
|
||||||
|
|
||||||
def assertIssueCommandState(self, command, expected):
|
def assertIssueCommandState(self, command, expected):
|
||||||
"""
|
"""
|
||||||
Asserts power action result for a given power command
|
Asserts power action result for a given power command
|
||||||
@ -392,7 +397,7 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
"""
|
"""
|
||||||
Tests out-of-band management issue power action
|
Tests out-of-band management issue power action
|
||||||
"""
|
"""
|
||||||
self.configureAndStartIpmiServer(power_state='on')
|
self.configureAndEnableOobm(power_state='on')
|
||||||
self.assertIssueCommandState('STATUS', 'On')
|
self.assertIssueCommandState('STATUS', 'On')
|
||||||
|
|
||||||
|
|
||||||
@ -401,7 +406,7 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
"""
|
"""
|
||||||
Tests out-of-band management issue power on action
|
Tests out-of-band management issue power on action
|
||||||
"""
|
"""
|
||||||
self.configureAndStartIpmiServer()
|
self.configureAndEnableOobm()
|
||||||
self.assertIssueCommandState('ON', 'On')
|
self.assertIssueCommandState('ON', 'On')
|
||||||
|
|
||||||
|
|
||||||
@ -410,7 +415,7 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
"""
|
"""
|
||||||
Tests out-of-band management issue power off action
|
Tests out-of-band management issue power off action
|
||||||
"""
|
"""
|
||||||
self.configureAndStartIpmiServer()
|
self.configureAndEnableOobm()
|
||||||
self.assertIssueCommandState('OFF', 'Off')
|
self.assertIssueCommandState('OFF', 'Off')
|
||||||
|
|
||||||
|
|
||||||
@ -419,7 +424,7 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
"""
|
"""
|
||||||
Tests out-of-band management issue power cycle action
|
Tests out-of-band management issue power cycle action
|
||||||
"""
|
"""
|
||||||
self.configureAndStartIpmiServer()
|
self.configureAndEnableOobm()
|
||||||
self.assertIssueCommandState('CYCLE', 'On')
|
self.assertIssueCommandState('CYCLE', 'On')
|
||||||
|
|
||||||
|
|
||||||
@ -428,7 +433,7 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
"""
|
"""
|
||||||
Tests out-of-band management issue power reset action
|
Tests out-of-band management issue power reset action
|
||||||
"""
|
"""
|
||||||
self.configureAndStartIpmiServer()
|
self.configureAndEnableOobm()
|
||||||
self.assertIssueCommandState('RESET', 'On')
|
self.assertIssueCommandState('RESET', 'On')
|
||||||
|
|
||||||
|
|
||||||
@ -437,7 +442,7 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
"""
|
"""
|
||||||
Tests out-of-band management issue power soft action
|
Tests out-of-band management issue power soft action
|
||||||
"""
|
"""
|
||||||
self.configureAndStartIpmiServer()
|
self.configureAndEnableOobm()
|
||||||
self.assertIssueCommandState('SOFT', 'Off')
|
self.assertIssueCommandState('SOFT', 'Off')
|
||||||
|
|
||||||
|
|
||||||
@ -453,7 +458,6 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
)[0].value
|
)[0].value
|
||||||
|
|
||||||
self.configureAndEnableOobm()
|
self.configureAndEnableOobm()
|
||||||
self.startIpmiServer()
|
|
||||||
bmc = IpmiServerContext().bmc
|
bmc = IpmiServerContext().bmc
|
||||||
|
|
||||||
bmc.powerstate = 'on'
|
bmc.powerstate = 'on'
|
||||||
@ -462,10 +466,10 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
bmc.powerstate = 'off'
|
bmc.powerstate = 'off'
|
||||||
self.checkSyncToState('Off', interval)
|
self.checkSyncToState('Off', interval)
|
||||||
|
|
||||||
self.server.shutdown()
|
|
||||||
self.server.server_close()
|
|
||||||
|
|
||||||
# Check for unknown state (ipmi server not reachable)
|
# Check for unknown state (ipmi server not reachable)
|
||||||
|
cmd = self.getOobmConfigCmd()
|
||||||
|
cmd.port = 1
|
||||||
|
response = self.apiclient.configureOutOfBandManagement(cmd)
|
||||||
self.checkSyncToState('Unknown', interval)
|
self.checkSyncToState('Unknown', interval)
|
||||||
|
|
||||||
|
|
||||||
@ -533,7 +537,6 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
name='outofbandmanagement.sync.interval'
|
name='outofbandmanagement.sync.interval'
|
||||||
)[0].value
|
)[0].value
|
||||||
|
|
||||||
self.startIpmiServer()
|
|
||||||
bmc = IpmiServerContext().bmc
|
bmc = IpmiServerContext().bmc
|
||||||
bmc.powerstate = 'on'
|
bmc.powerstate = 'on'
|
||||||
|
|
||||||
@ -550,7 +553,6 @@ class TestOutOfBandManagement(cloudstackTestCase):
|
|||||||
Tests out-of-band management change password feature
|
Tests out-of-band management change password feature
|
||||||
"""
|
"""
|
||||||
self.configureAndEnableOobm()
|
self.configureAndEnableOobm()
|
||||||
self.startIpmiServer()
|
|
||||||
|
|
||||||
self.debug("Testing oobm change password")
|
self.debug("Testing oobm change password")
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ class TestRegions(cloudstackTestCase):
|
|||||||
cls.domain = get_domain(cls.apiclient)
|
cls.domain = get_domain(cls.apiclient)
|
||||||
cls.cleanup = []
|
cls.cleanup = []
|
||||||
|
|
||||||
@attr(tags=["basic", "advanced"], required_hardware="true")
|
@attr(tags=["basic", "advanced"], required_hardware="false")
|
||||||
def test_createRegion(self):
|
def test_createRegion(self):
|
||||||
""" Test for create region
|
""" Test for create region
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -19,4 +19,5 @@
|
|||||||
# As the filename suggests, this is executed on build failure
|
# As the filename suggests, this is executed on build failure
|
||||||
# failure.
|
# failure.
|
||||||
#
|
#
|
||||||
|
find rat.txt -type f -exec echo -e "Printing RAT license-failures {} :\n" \; -exec cat {} \;
|
||||||
find /tmp//MarvinLogs -type f -exec echo -e "Printing logfile {} :\n" \; -exec cat {} \;
|
find /tmp//MarvinLogs -type f -exec echo -e "Printing logfile {} :\n" \; -exec cat {} \;
|
||||||
|
|||||||
@ -19,25 +19,4 @@
|
|||||||
# This script should run any tear down commands required.
|
# 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
|
mvn -Dsimulator -pl client jetty:stop 2>&1
|
||||||
|
|||||||
@ -21,26 +21,6 @@
|
|||||||
# or internet downloads.
|
# 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 "#### System Information ####"
|
||||||
|
|
||||||
echo -e "\nJava Version: "
|
echo -e "\nJava Version: "
|
||||||
@ -125,41 +105,3 @@ do
|
|||||||
cat /tmp/piplog
|
cat /tmp/piplog
|
||||||
done
|
done
|
||||||
|
|
||||||
#Download project dependencies in a way we can retry if there's a failure, without failing the whole build
|
|
||||||
|
|
||||||
#Resolve plugins first
|
|
||||||
echo -e "\nDownloading Plugin dependencies"
|
|
||||||
for ((i=0;i<$RETRY_COUNT;i++))
|
|
||||||
do
|
|
||||||
#The output file is used on the next phase by the downloadDeps.sh script
|
|
||||||
mvn org.apache.maven.plugins:maven-dependency-plugin:resolve-plugins | grep "Plugin Resolved:" | sort -u | awk '{print $4}' | tee /tmp/resolvedPlugins
|
|
||||||
if [[ $? -eq 0 ]]; then
|
|
||||||
echo -e "\nPlugin dependencies downloaded successfully"
|
|
||||||
break;
|
|
||||||
fi
|
|
||||||
echo -e "\nDependency download failed"
|
|
||||||
#Test DNS record
|
|
||||||
getent hosts repo1.maven.org
|
|
||||||
while ! nc -vzw 5 repo1.maven.org 80; do echo -e "\nFailed to connect to repo1.maven.org:80 will retry in 10 seconds"; sleep 10; done
|
|
||||||
done
|
|
||||||
|
|
||||||
#Resolve remaining deps
|
|
||||||
cd tools/travis
|
|
||||||
echo -e "\nDownloading Project dependencies"
|
|
||||||
|
|
||||||
for ((i=0;i<$RETRY_COUNT;i++))
|
|
||||||
do
|
|
||||||
./downloadDeps.sh > /tmp/phase2
|
|
||||||
if [[ $? -eq 0 ]]; then
|
|
||||||
echo -e "\n$(cat cleandeps.out |wc -l) project dependencies downloaded successfully"
|
|
||||||
break;
|
|
||||||
fi
|
|
||||||
echo -e "\nDependency download failed"
|
|
||||||
#Print out errors from failed run
|
|
||||||
cat /tmp/phase2 | grep -i -e "fail" -e "error" -e "exception"
|
|
||||||
#Test DNS record
|
|
||||||
getent hosts repo1.maven.org
|
|
||||||
while ! nc -vzw 5 repo1.maven.org 80; do echo -e "\nFailed to connect to repo1.maven.org:80 will retry in 10 seconds"; sleep 10; done
|
|
||||||
echo -e "\nRetrying download"
|
|
||||||
done
|
|
||||||
cd ../..
|
|
||||||
|
|||||||
@ -18,24 +18,7 @@
|
|||||||
#
|
#
|
||||||
# This script should be used to bring up the environment.
|
# This script should be used to bring up the environment.
|
||||||
#
|
#
|
||||||
|
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/urandom"
|
||||||
|
|
||||||
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 MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m -Djava.security.egd=file:/dev/./urandom"
|
|
||||||
echo -e "\nStarting simulator"
|
echo -e "\nStarting simulator"
|
||||||
mvn -Dsimulator -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log &
|
mvn -Dsimulator -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log &
|
||||||
|
|
||||||
|
|||||||
@ -1,158 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
# or more contributor license agreements. See the NOTICE file
|
|
||||||
# distributed with this work for additional information
|
|
||||||
# regarding copyright ownership. The ASF licenses this file
|
|
||||||
# to you 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.
|
|
||||||
#
|
|
||||||
# This script should be used to install additional dependencies
|
|
||||||
# This includes: installing ubuntu packages, custom services
|
|
||||||
# or internet downloads.
|
|
||||||
|
|
||||||
# Authored by Rafael da Fonseca <rsafonseca@gmail.com>
|
|
||||||
|
|
||||||
#Get all dependency blocks from all pom.xml files in the project
|
|
||||||
for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/dependencies>/b;p;ba}' {} \; | grep -e "artifactId" -e "groupId" -e "version" -e "dependency\>" -e "exclusion\>" -e "exclusions\>"| sed -e 's/\^M//'); do
|
|
||||||
|
|
||||||
#Tokenize values
|
|
||||||
set -- $(echo $line | awk -v FS="(>|<)" '{print $2, $3}')
|
|
||||||
|
|
||||||
#Start processing data
|
|
||||||
if [[ $1 == "dependency" ]]; then
|
|
||||||
#Create new artifact dep
|
|
||||||
unset ARTIFACT
|
|
||||||
unset VERSION
|
|
||||||
unset GROUP
|
|
||||||
elif [[ $1 == "/dependency" ]]; then
|
|
||||||
#Filter out project modules interdependencies
|
|
||||||
if [[ $GROUP != *org.apache.cloudstack* ]] && [[ $GROUP != *com.cloud* ]] && [[ $ARTIFACT != cloudstack-service-console-proxy-rdpclient ]]; then
|
|
||||||
if [[ -z $VERSION ]] ; then
|
|
||||||
VERSION=LATEST
|
|
||||||
#These dependencies don't support the LATEST keywork for some reason, and would cause mvn runs to file on dummy poms
|
|
||||||
if [[ $GROUP == jstl ]] || [[ $ARTIFACT == mysql-connector-java ]] || [[ $GROUP == org.apache.axis ]]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
#Output resolved dependency to a file, to be picked up later
|
|
||||||
echo "$GROUP $ARTIFACT $VERSION" >> deps.out
|
|
||||||
fi
|
|
||||||
elif [[ $1 == "version" ]]; then
|
|
||||||
#If version is a maven var, get the value from parent pom
|
|
||||||
if [[ $2 == \$\{* ]]; then
|
|
||||||
VERSION=$(grep \<$(echo $2 | awk -v FS="(}|{)" '{print $2 }') ../../pom.xml | awk -v FS="(>|<)" '{print $3}')
|
|
||||||
#If version tag is empty, add LATEST to avoid maven errors
|
|
||||||
elif [[ "$2" == "" ]]; then
|
|
||||||
VERSION="LATEST"
|
|
||||||
else
|
|
||||||
VERSION=$2
|
|
||||||
fi
|
|
||||||
elif [[ $1 == "artifactId" ]]; then
|
|
||||||
#This avoids exclusions inside dependency block to overwrite original dependency
|
|
||||||
if [[ -z $ARTIFACT ]]; then
|
|
||||||
ARTIFACT=$2
|
|
||||||
fi
|
|
||||||
elif [[ $1 == "groupId" ]]; then
|
|
||||||
#This avoids exclusions inside dependency block to overwrite original dependency
|
|
||||||
if [[ -z $GROUP ]]; then
|
|
||||||
GROUP=$2
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
#Add the resolved plugins to properly download their dependencies
|
|
||||||
while read line ; do
|
|
||||||
NAME=$(echo $line | sed -e 's/.jar$//')
|
|
||||||
VERSION=${NAME##*-}
|
|
||||||
ARTIFACT=${NAME%-*}
|
|
||||||
GROUP=$(find ~/.m2/repository -name ${NAME}.pom -exec sed -n "1,/${ARTIFACT}/p" {} \; | tac | grep -m 1 -e "<groupId>" | sed -e 's/^[[:space:]]*//' -e 's/\^M//' | tr -d '\r' | awk -v FS="(>|<)" '{print $3}')
|
|
||||||
DATA="${GROUP} ${ARTIFACT} ${VERSION}"
|
|
||||||
echo $DATA >> deps.out
|
|
||||||
done < /tmp/resolvedPlugins
|
|
||||||
|
|
||||||
#Remove duplicates and sort them, LANG export is needed to fix some sorting issue, sorting is needed for later function that relies on sorted input
|
|
||||||
cat deps.out | LANG=C sort -u > cleandeps.out
|
|
||||||
|
|
||||||
#Define index of pomfiles, to avoid duplicate deps with different versions in pom.xml, several poms are created in case of more than one version of same artifact
|
|
||||||
LASTPOM=0
|
|
||||||
#Create first pom
|
|
||||||
echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><dependencies>' > pom${LASTPOM}.xml
|
|
||||||
#Create pom for dependencies not on central repo, this is done separately to not adversely impact performance on downloading the majority of deps
|
|
||||||
echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><repositories><repository><id>mido-maven-public-releases</id><name>mido-maven-public-releases</name><url>http://cs-maven.midokura.com/releases</url></repository><repository><id>juniper-contrail</id><url>http://juniper.github.io/contrail-maven/snapshots</url></repository></repositories><dependencies>' > pomX.xml
|
|
||||||
while read line ; do
|
|
||||||
set -- $line
|
|
||||||
#This relies on correct sorting, and distributes different versions of same dependency througout different pom files
|
|
||||||
if [[ $2 == $LASTARTIFACT ]]; then
|
|
||||||
POMID=$(($POMID+1))
|
|
||||||
#If value is greater than current number of poms, create a new one
|
|
||||||
if [[ $POMID -gt $LASTPOM ]]; then
|
|
||||||
LASTPOM=$POMID
|
|
||||||
#This outputs the necessary structure to start a pom and also defines the extra repositories
|
|
||||||
echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><dependencies>' > pom${LASTPOM}.xml
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
POMID=0
|
|
||||||
fi
|
|
||||||
LASTARTIFACT=$2
|
|
||||||
if [[ $1 == org.midonet ]] || [[ $1 == net.juniper* ]]; then
|
|
||||||
echo "<dependency><groupId>$1</groupId><artifactId>$2</artifactId><version>$3</version></dependency>" >> pomX.xml
|
|
||||||
else
|
|
||||||
echo "<dependency><groupId>$1</groupId><artifactId>$2</artifactId><version>$3</version></dependency>" >> pom${POMID}.xml
|
|
||||||
fi
|
|
||||||
done < cleandeps.out
|
|
||||||
|
|
||||||
RETURN_CODE=0
|
|
||||||
#Close and resolve all pom files
|
|
||||||
for ((i=0;i<=$LASTPOM;i++))
|
|
||||||
do
|
|
||||||
echo "</dependencies></project>" >> pom${i}.xml
|
|
||||||
mvn org.apache.maven.plugins:maven-dependency-plugin:resolve -f pom${i}.xml
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
RETURN_CODE=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
#Close and resolve external deps pom file
|
|
||||||
echo "</dependencies></project>" >> pomX.xml
|
|
||||||
mvn org.apache.maven.plugins:maven-dependency-plugin:resolve -f pomX.xml
|
|
||||||
|
|
||||||
#Run a few plugin goals to download some more deps
|
|
||||||
|
|
||||||
#Hack to run maven-jaxb2-plugin generate, can be removed when we stop using such an old version...
|
|
||||||
mkdir -p src/main/resources
|
|
||||||
echo '<?xml version="1.0" encoding="utf-8" ?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"></xs:schema>' > src/main/resources/test.xsd
|
|
||||||
|
|
||||||
#Declare plugin tests to run
|
|
||||||
declare -a arr=("maven-surefire-plugin test" "maven-pmd-plugin pmd" "maven-compiler-plugin compile" "maven-resources-plugin resources" "maven-checkstyle-plugin check" "maven-site-plugin attach-descriptor" "maven-surefire-plugin test" "maven-jar-plugin jar" "license-maven-plugin check" "maven-jgit-buildnumber-plugin extract-buildnumber" "maven-jaxb2-plugin generate" "maven-war-plugin war -DfailOnMissingWebXml=false" "gmaven-plugin compile")
|
|
||||||
for i in "${arr[@]}"
|
|
||||||
do
|
|
||||||
set -- $i
|
|
||||||
PLUGIN=$1
|
|
||||||
MOJO=$2
|
|
||||||
OPTION=$3
|
|
||||||
#Get every listed version of the plugin and make a run for each version
|
|
||||||
while read line ; do
|
|
||||||
set -- $line
|
|
||||||
JOBS="${JOBS} ${1}:${2}:${3}:${MOJO} $OPTION"
|
|
||||||
done < <(grep $PLUGIN cleandeps.out)
|
|
||||||
done
|
|
||||||
echo "Running $JOBS"
|
|
||||||
#Call all the constructed plugin goals
|
|
||||||
mvn $JOBS -f pom0.xml
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
RETURN_CODE=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
#Cleanup some files created in the run
|
|
||||||
rm -rf deps.out src target
|
|
||||||
|
|
||||||
exit $RETURN_CODE
|
|
||||||
@ -19,27 +19,19 @@
|
|||||||
# This should be used to create the build.
|
# 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`
|
export TEST_SEQUENCE_NUMBER=`echo $TRAVIS_JOB_NUMBER | cut -d. -f2`
|
||||||
|
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/./urandom"
|
||||||
|
|
||||||
#run regression test only on $REGRESSION_CYCLE
|
set -e
|
||||||
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 MAVEN_OPTS="-Xmx2048m -XX:MaxPermSize=500m -Djava.security.egd=file:/dev/./urandom"
|
|
||||||
|
|
||||||
if [ $TEST_SEQUENCE_NUMBER -eq 1 ]; then
|
if [ $TEST_SEQUENCE_NUMBER -eq 1 ]; then
|
||||||
mvn -Pdeveloper,systemvm -Dsimulator clean install -T4 | egrep "Building|Tests|SUCCESS|FAILURE"
|
git clone https://github.com/rhtyd/cloudstack-nonoss.git nonoss
|
||||||
|
cd nonoss && bash -x install-non-oss.sh && cd ..
|
||||||
|
git clean -fdx .
|
||||||
|
mvn -P developer,systemvm -Dsimulator -Dnoredist --projects='org.apache.cloudstack:cloudstack' org.apache.rat:apache-rat-plugin:0.12:check
|
||||||
|
mvn -P developer,systemvm -Dsimulator -Dnoredist clean install
|
||||||
else
|
else
|
||||||
mvn -Pdeveloper -Dsimulator clean install -DskipTests=true -T4 | egrep "Building|Tests|SUCCESS|FAILURE"
|
mvn -Pdeveloper -Dsimulator clean install -DskipTests -T4 | egrep "Building|Tests|SUCCESS|FAILURE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install mysql-connector-python
|
# Install mysql-connector-python
|
||||||
|
|||||||
@ -20,20 +20,6 @@
|
|||||||
# test environment and executing the tests.
|
# test environment and executing the tests.
|
||||||
#
|
#
|
||||||
|
|
||||||
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/smoke/misc
|
||||||
mkdir -p integration-test-results/component
|
mkdir -p integration-test-results/component
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ def _generate_file_list(args):
|
|||||||
|
|
||||||
def parse_reports(file_path_list):
|
def parse_reports(file_path_list):
|
||||||
table = texttable.Texttable()
|
table = texttable.Texttable()
|
||||||
table.header(['Test', 'Result', 'Time'])
|
table.header(['Test', 'Result', 'Time', 'Test file'])
|
||||||
|
|
||||||
exit_code = 0
|
exit_code = 0
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ def parse_reports(file_path_list):
|
|||||||
if 'type' in children.attrib:
|
if 'type' in children.attrib:
|
||||||
status = children.attrib['type']
|
status = children.attrib['type']
|
||||||
|
|
||||||
table.add_row([name, status, time])
|
table.add_row([name, status, time, file_path.replace(".xml", "").split("/")[-1]])
|
||||||
|
|
||||||
print table.draw()
|
print table.draw()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user