Merge "Fix Invalid fpgconfig options in driver.py"

This commit is contained in:
Zuul 2019-04-02 02:40:24 +00:00 committed by Gerrit Code Review
commit b330e1b547
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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