diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2024-04-15 10:20:23 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-15 09:20:23 -0700 |
commit | f9f97bf22b6d96e8554c944b76b6aa1c55f50924 (patch) | |
tree | cad17e14f6c582fd32e3f31aca1d14653e2f5a32 /.gitignore | |
parent | 8033455d5ff4071eeef71801ced9f13e1bcfd16b (diff) | |
download | spack-f9f97bf22b6d96e8554c944b76b6aa1c55f50924.tar.gz spack-f9f97bf22b6d96e8554c944b76b6aa1c55f50924.tar.bz2 spack-f9f97bf22b6d96e8554c944b76b6aa1c55f50924.tar.xz spack-f9f97bf22b6d96e8554c944b76b6aa1c55f50924.zip |
tests: Spec tests shouldn't fetch remote git repositories. (#43656)
Currently, some of the tests in `spec_format` and `spec_semantics` fetch
the actual zlib repository when run, because they call `str()` on specs
like `zlib@foo/bar`, which at least currently requires a remote git clone
to resolve.
This doesn't change the behavior of git versions, but it uses our mock git
repo infrastructure and clones the `git-test` package instead of the *real*
URL from the mock `zlib` package.
This should speed up tests. We could probably refactor more so that the git
tests *all* use such a fixture, but the `checks` field that unfortunately
tightly couples the mock git repository and the `git_fetch` tests complicates
this. We could also consider *not* making `str()` resolve git versions, but
I did not dig into that here.
- [x] add a mock_git_test_package fixture that sets up a mock git repo *and*
monkeypatches the `git-test` package (like our git test packages do)
- [x] use fixture in `test_spec_format_path`
- [x] use fixture in `test_spec_format_path_posix`
- [x] use fixture in `test_spec_format_path_windows`
- [x] use fixture in `test_parse_single_spec`
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions