c9277285a3
The error info as follows: testtools.matchers._impl.MismatchError: !=: reference = {'cpid_info': '0000:5e:00.0', 'cpid_type': 'pci'} actual = {'cpid_info': u'0000:be:00.0', 'cpid_type': u'pci'} The reason for assertError is that 'intel-fpga-dev.2' is found earilier than 'intel-fpga-dev.1' randomly because of the module 'glob.glob'. In cyborg/accelerator/drivers/fpga/intel/sysinfo.py Line 81, method all_pf_fpgas(), it use glob.glob(..) to find fpga dirvers. However, this glob module does not guarantee that the file name obtained is ordered. For convenience, we can sort the fpgas before assert. Reference docs: https://docs.python.org/2.7/library/glob.html?highlight=glob#glob.glob https://docs.python.org/2.7/library/os.html?highlight=listdir#os.listdir http://landcareweb.com/questions/34393/an-ri-qi-shun-xu-sou-suo-glob Change-Id: Ie9de5d7ec06064f557620ec4ee21f7bd776c2add