Merge "Fix Invalid fpgconfig options in driver.py"
This commit is contained in:
commit
b330e1b547
|
@ -47,7 +47,7 @@ class IntelFPGADriver(FPGADriver):
|
|||
bdf = sysinfo.get_bdf_by_path(path)
|
||||
bdfs = sysinfo.split_bdf(bdf)
|
||||
cmd = ["sudo", "/usr/bin/fpgaconf"]
|
||||
for i in zip(["-b", "-d", "-f"], bdfs):
|
||||
for i in zip(["--bus", "--device", "--function"], bdfs):
|
||||
cmd.extend(i)
|
||||
cmd.append(image)
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
||||
|
|
|
@ -108,8 +108,8 @@ class TestIntelFPGADriver(base.TestCase):
|
|||
b = "0x5e"
|
||||
d = "0x00"
|
||||
f = "0x0"
|
||||
expect_cmd = ['sudo', '/usr/bin/fpgaconf', '-b', b,
|
||||
'-d', d, '-f', f, '/path/image']
|
||||
expect_cmd = ['sudo', '/usr/bin/fpgaconf', '--bus', b,
|
||||
'--device', d, '--function', f, '/path/image']
|
||||
mock_popen.return_value = p()
|
||||
intel = IntelFPGADriver()
|
||||
# program VF
|
||||
|
|
Loading…
Reference in New Issue