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

Don't error on fusesoc library update when sync-version is used for a git-provided library #724

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jfrimmel
Copy link
Contributor

See #721 for context. This PR uses git fetch instead of git pull when on a git tag. This won't cause any errors on git tags and thus the library update won't fail. It even supports switching to a new tag, when the sync-version-field in the fusesoc.conf-file is altered.

Best reviewed commit-by-commit:

  • The first commit is just some housekeeping.
  • The second commit introduces a new test module, which comes in very handy for testing sequences of shell commands. The module contains a fixture, which will run the testcase in a temporary directory. The _fusesoc()-function can be used to run shell commands. I'm a little bit proud of how the test module turned out: there is almost no boilerplate in actual test functions.
  • The last commit contains the actual change.

Fixes #721.

This commit creates the new `test_usecases`-module, which allows to
easily/conveniently create tests, that exercise command line executions
fo fusesoc. This allows to ergonomically define testcases involving
multiple commands.
See olofk#721 for context. This simply uses `git fetch` instead of `git pull`
if a specific version is requested. This is a kind of hacky solution,
since this won't work if somebody removes the `sync-version` from the
`fusesoc.conf`-file (in that case, the code will use `git pull` again,
which will fail as before). Since this usecase is not that common, this
commit should be enough for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Library update fails with git provider and fixed sync-version
1 participant