Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Javagedes committed Dec 5, 2023
1 parent 9cf3e1c commit 36e0f0b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests.unit/database/test_instanced_fv_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,20 @@ def test_valid_fdf(empty_tree: Tree): # noqa: F811
comp1 = empty_tree.create_component("TestDriver1", "DXE_DRIVER")
comp2 = empty_tree.create_component("TestDriver2", "DXE_DRIVER")
comp3 = empty_tree.create_component("TestDriver3", "DXE_DRIVER")
comp4 = str(Path('TestPkg','Extra Drivers','TestDriver4.inf'))
Path(empty_tree.package / "Extra Drivers").mkdir()
Path(empty_tree.package / "Extra Drivers" / "TestDriver4.inf").touch()
comp5 = empty_tree.create_component("TestDriver5", "DXE_DRIVER")

dsc = empty_tree.create_dsc()

# Write the FDF; includes a "infformat" FV used to test
# All the different ways an INF can be defined in the FDF
fdf = empty_tree.create_fdf(
fv_infformat = [
fv_testfv = [
f"INF {comp1}", # PP relative
f'INF {str(empty_tree.ws / comp2)}', # Absolute
f'INF RuleOverride=RESET_VECTOR {comp3}', # RuleOverride
f'INF {comp4}', # Space in path
'INF TestPkg/Extra Drivers/TestDriver4.inf', # Space in path
f'INF ruleoverride = RESET_VECTOR {comp5}', # RuleOverride lowercase & spaces'
]
)
Expand All @@ -54,14 +55,14 @@ def test_valid_fdf(empty_tree: Tree): # noqa: F811
}
db.parse(env)

rows = db.connection.execute("SELECT key2 FROM junction where key1 == 'infformat'").fetchall()
rows = db.connection.execute("SELECT key2 FROM junction where key1 == 'testfv'").fetchall()

assert len(rows) == 5
assert sorted(rows) == sorted([
(Path(comp1).as_posix(),),
(Path(comp2).as_posix(),),
(Path(comp3).as_posix(),),
(Path(comp4).as_posix(),),
('TestPkg/Extra Drivers/TestDriver4.inf',),
(Path(comp5).as_posix(),),
])

Expand Down

0 comments on commit 36e0f0b

Please sign in to comment.