Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests broken in test_vlsir after #185 #187

Closed
nikosavola opened this issue Oct 17, 2023 · 5 comments · Fixed by #197
Closed

Fix tests broken in test_vlsir after #185 #187

nikosavola opened this issue Oct 17, 2023 · 5 comments · Fixed by #197
Labels
bug Something isn't working

Comments

@nikosavola
Copy link
Member

nikosavola commented Oct 17, 2023

Describe the bug
The test in gplugins/vlsir/tests/test_vlsir.py fail with

=========================== short test summary info ============================
FAILED gplugins/vlsir/tests/test_vlsir.py::test_kdb_vlsir - ValueError: LayerView (10000, 0) not in [(1, 0), (111, 0), (2, 0), (2, 6), (3, 0), (3, 6), (2, 9), (3, 1), (20, 0), (22, 0), (24, 0), (21, 0), (23, 0), (25, 0), (27, 0), (26, 0), (29, 0), (34, 0), (36, 0), (5, 0), (39, 0), (47, 0), (41, 0), (45, 0), (49, 0), (40, 0), (44, 0), (43, 0), (42, 0), (46, 0), (4, 0), (6, 0), (190, 0), (191, 0), (201, 0), (202, 0), (203, 0), (204, 0), (206, 0), (65, 0), (67, 0), (64, 0), (100, 0), (101, 0), (110, 0), (733, 0), (68, 0), (1, 10), (81, 0), (66, 0), (69, 0), (1, 11), (300, 0), (301, 0), (319, 0), (320, 0), (321, 0), (330, 0), (327, 0), (331, 0), (313, 0), (311, 0), (302, 0), (315, 0), (303, 0), (304, 0), (305, 0), (306, 0), (307, 0), (317, 0), (309, 0), (308, 0), (399, 0), (310, 0), (205, 0), (71, 0), (72, 0), (73, 0), (1000, 0), (1, 12), (99999, 0)]
FAILED gplugins/vlsir/tests/test_vlsir.py::test_export_netlist - ValueError: LayerView (10000, 0) not in [(1, 0), (111, 0), (2, 0), (2, 6), (3, 0), (3, 6), (2, 9), (3, 1), (20, 0), (22, 0), (24, 0), (21, 0), (23, 0), (25, 0), (27, 0), (26, 0), (29, 0), (34, 0), (36, 0), (5, 0), (39, 0), (47, 0), (41, 0), (45, 0), (49, 0), (40, 0), (44, 0), (43, 0), (42, 0), (46, 0), (4, 0), (6, 0), (190, 0), (191, 0), (201, 0), (202, 0), (203, 0), (204, 0), (206, 0), (65, 0), (67, 0), (64, 0), (100, 0), (101, 0), (110, 0), (733, 0), (68, 0), (1, 10), (81, 0), (66, 0), (69, 0), (1, 11), (300, 0), (301, 0), (319, 0), (320, 0), (321, 0), (330, 0), (327, 0), (331, 0), (313, 0), (311, 0), (302, 0), (315, 0), (303, 0), (304, 0), (305, 0), (306, 0), (307, 0), (317, 0), (309, 0), (308, 0), (399, 0), (310, 0), (205, 0), (71, 0), (72, 0), (73, 0), (1000, 0), (1, 12), (99999, 0)]

after merging #185.

To Reproduce

pytest gplugins

Expected behavior
Succeed

Suggested fix
Maybe need to accept layers that don't exist in the active Pdk?

@nikosavola nikosavola added the bug Something isn't working label Oct 17, 2023
@nikosavola
Copy link
Member Author

The problem happens only if running all the tests, not in isolation. Maybe some other test modifes the pdk?

@nikosavola
Copy link
Member Author

nikosavola commented Oct 17, 2023

This seems to stem from the layer WAFER = (99999, 0) being reduced to (10000, 0) when exporting the KLayout technology file. Something must be changing the pdk.
Not sure why it's not a problem in the isolated tests.

@nikosavola
Copy link
Member Author

I think the problem comes from the meow plugin adding layers to the pdk that doon't have corresponding LayerViews.

def add_global_layers(
self,
component,
layerstack,
buffer_y: float = 1,
global_layer_index: int = 10000,
):

Maybe a reasonable fix is to isolate the meow tests or somehow reload the pdk after running meow.

@nikosavola
Copy link
Member Author

nikosavola commented Oct 18, 2023

I think #197 was supposed to actually close #189 instead of this. Nevertheless seems that the test works again. I feel like this was just a case of lucky test execution order for now, we can reopen the issue and use #188 if the problem persists.

@joamatab
Copy link
Contributor

i made a copy of the layers_stack inside the MEOW plugin, so tests are robust now and don't couple to each other through the layer_stack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants