From a1811bbea7a4c52f60561cf280c3a51d0abc8e9d Mon Sep 17 00:00:00 2001 From: aticig Date: Fri, 11 Mar 2022 15:03:55 +0300 Subject: [PATCH] Fix Bug 1910 Enabling stage-test failing by tox results Change-Id: I9d8fd2104916a1b16fccb68d21126891ac512b9f Signed-off-by: aticig --- .../osm_rovim_vmware/vimconn_vmware.py | 13 +++++------- devops-stages/stage-test.sh | 3 +-- .../notes/fix_bug_1910-f756ed0d035461f2.yaml | 21 +++++++++++++++++++ 3 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 releasenotes/notes/fix_bug_1910-f756ed0d035461f2.yaml diff --git a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py index 5a58cf98..6756ef45 100644 --- a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py +++ b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py @@ -6230,7 +6230,7 @@ class vimconnector(vimconn.VimConnector): ) return None - deviceId = hex(host_pci_dev.deviceId % 2 ** 16).lstrip("0x") + deviceId = hex(host_pci_dev.deviceId % 2**16).lstrip("0x") backing = vim.VirtualPCIPassthroughDeviceBackingInfo( deviceId=deviceId, id=host_pci_dev.id, @@ -7493,13 +7493,10 @@ if [ "$1" = "precustomization" ];then for device in devices: if type(device) is vim.vm.device.VirtualDisk: - if ( - isinstance( - device.backing, - vim.vm.device.VirtualDisk.FlatVer2BackingInfo, - ) - and hasattr(device.backing, "fileName") - ): + if isinstance( + device.backing, + vim.vm.device.VirtualDisk.FlatVer2BackingInfo, + ) and hasattr(device.backing, "fileName"): disk_info["full_path"] = device.backing.fileName disk_info["datastore"] = device.backing.datastore disk_info["capacityKB"] = device.capacityInKB diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 2b39c48f..278b33bf 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -14,5 +14,4 @@ # limitations under the License. echo launching tox -OUTPUT=$(TOX_PARALLEL_NO_SPINNER=1 tox --parallel=auto) -printf '%s\n' "$OUTPUT" +tox --parallel=auto diff --git a/releasenotes/notes/fix_bug_1910-f756ed0d035461f2.yaml b/releasenotes/notes/fix_bug_1910-f756ed0d035461f2.yaml new file mode 100644 index 00000000..7d9d05d4 --- /dev/null +++ b/releasenotes/notes/fix_bug_1910-f756ed0d035461f2.yaml @@ -0,0 +1,21 @@ +####################################################################################### +# Copyright ETSI Contributors and Others. +# +# Licensed 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. +####################################################################################### +--- +fixes: + - | + Fixing Bug 1910: This fix allows stage tests to fail based on tox results. + By this way, Jenkins builds will not be successful unless all tests are passed. -- 2.17.1