Hi AI: Thanks . I found a way to fix "rpm package" issue. https://review.openstack.org/#/c/596563/. Thanks. BR Austin Sun. From: Bailey, Henry Albert (Al) [mailto:Al.Bailey@windriver.com] Sent: Friday, August 24, 2018 10:59 PM To: Sun, Austin <austin.sun@intel.com>; An, Ran1 <ran1.an@intel.com>; Liu, Tao <Tao.Liu@windriver.com>; starlingx-discuss@lists.starlingx.io Subject: RE: [Starlingx-discuss] add unit test to zuul You can use a similar trick in controllerconfig for fm_core Add something like this to controllerconfig/tests/__init__.py try: import fm_core except: import mock import sys sys.modules['fm_core'] = mock.Mock() The tox.ini paths also need to be adjusted. The tests themselves are failing due to version discrepencies (18.03 vs 18.04). I have not looked into this. For the rpm package, in Centos the rpm-python package needed to be yum installed and site-packages set to true in tox.ini. I don't have Ubuntu experience but from what I have read, Ubuntu uses Debian format instead of RPM so the code would likely need to be written differently to work in an Ubuntu env. Al From: Sun, Austin [mailto:austin.sun@intel.com] Sent: Friday, August 24, 2018 10:31 AM To: Bailey, Henry Albert (Al); An, Ran1; Liu, Tao; starlingx-discuss@lists.starlingx.io<mailto:starlingx-discuss@lists.starlingx.io> Subject: RE: [Starlingx-discuss] add unit test to zuul Hi AI and All: Thanks. https://review.openstack.org/#/c/595352/ was merged, but An ran is working on controlconfig , which is different unit test with sysinv. Can it use similar fix for controlconfig ? BTW: I met "ImportError: No module named rpm" in Ubuntu platform for sysinv unit test. Do you know how to install python rpm package in Ubuntu ? I tried several ways , but none worked. Thanks. BR Austin Sun. From: Bailey, Henry Albert (Al) [mailto:Al.Bailey@windriver.com] Sent: Friday, August 24, 2018 9:19 PM To: An, Ran1 <ran1.an@intel.com<mailto:ran1.an@intel.com>>; Liu, Tao <Tao.Liu@windriver.com<mailto:Tao.Liu@windriver.com>>; starlingx-discuss@lists.starlingx.io<mailto:starlingx-discuss@lists.starlingx.io> Subject: Re: [Starlingx-discuss] add unit test to zuul You should be able to run tox -e py27 now since this commit was merged https://github.com/openstack/stx-config/commit/b9ce2626ff452d3c9ffc58cdbcac3... Al From: An, Ran1 [mailto:ran1.an@intel.com] Sent: Thursday, August 23, 2018 10:15 PM To: Liu, Tao; starlingx-discuss@lists.starlingx.io<mailto:starlingx-discuss@lists.starlingx.io> Subject: [Starlingx-discuss] add unit test to zuul Hi: I'm looking to add exist unit tests of controlconfig(under project stx-config) to zuul but 2 of them are fail now. The error note that can't import module "fm_core" which seams be imported by commit https://git.openstack.org/cgit/openstack/stx-fault/commit/fm-api/fm_api/fm_a.... Does anyone is on the way to fixing this? Thanks Ran An