Skip to content

Commit

Permalink
Don't leave back stray library after tests
Browse files Browse the repository at this point in the history
The new test `test_library_update_with_initialize` introduced in olofk#720
did use the `fusesoc_libraries`-directory in the repository root and, in
contrast to other tests in that module, did not delete it afterwards.
This causes a leftover library in the repository root after running the
testsuite. This is unpleasant and a bug in the test.

This commit fixes it by cloning into the temporary directory, which was
already created for just this use-case.
  • Loading branch information
jfrimmel committed Jan 17, 2025
1 parent b604f53 commit 9c6f975
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def test_library_update_with_initialize(caplog):
library_root = {library}
[library.vlog_tb_utils]
location = fusesoc_libraries/vlog_tb_utils
location = {library}/vlog_tb_utils
sync-uri = https://github.com/fusesoc/vlog_tb_utils
sync-type = git
auto-sync = true
Expand All @@ -245,5 +245,5 @@ def test_library_update_with_initialize(caplog):
fs.update_libraries([])

assert "vlog_tb_utils does not exist. Trying a checkout" in caplog.text
assert "Cloning library into fusesoc_libraries/vlog_tb_utils" in caplog.text
assert f"Cloning library into {library}/vlog_tb_utils" in caplog.text
assert "Updating..." in caplog.text

0 comments on commit 9c6f975

Please sign in to comment.