diff options
author | Nicole C. <48625123+nicolecheetham@users.noreply.github.com> | 2024-08-22 12:49:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-22 09:49:32 -0700 |
commit | 1bcb1fcebc42d9de78e48a950950d08d75bb2646 (patch) | |
tree | 159985040a7ff50b3f679d7f90d5679710a7e3cc | |
parent | f19b65723528e4385b52b1e01680ac991622161a (diff) | |
download | spack-1bcb1fcebc42d9de78e48a950950d08d75bb2646.tar.gz spack-1bcb1fcebc42d9de78e48a950950d08d75bb2646.tar.bz2 spack-1bcb1fcebc42d9de78e48a950950d08d75bb2646.tar.xz spack-1bcb1fcebc42d9de78e48a950950d08d75bb2646.zip |
Windows: port tests for mirror/blame (#45259)
-rw-r--r-- | lib/spack/spack/test/cmd/blame.py | 5 | ||||
-rw-r--r-- | lib/spack/spack/test/mirror.py | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/lib/spack/spack/test/cmd/blame.py b/lib/spack/spack/test/cmd/blame.py index f9484e2dce..dcc26c9153 100644 --- a/lib/spack/spack/test/cmd/blame.py +++ b/lib/spack/spack/test/cmd/blame.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + import pytest from llnl.util.filesystem import working_dir @@ -33,11 +35,10 @@ def test_blame_by_percent(mock_packages): assert "EMAIL" in out -@pytest.mark.not_on_windows("Not supported on Windows (yet)") def test_blame_file(mock_packages): """Sanity check the blame command to make sure it works.""" with working_dir(spack.paths.prefix): - out = blame("bin/spack") + out = blame(os.path.join("bin", "spack")) assert "LAST_COMMIT" in out assert "AUTHOR" in out assert "EMAIL" in out diff --git a/lib/spack/spack/test/mirror.py b/lib/spack/spack/test/mirror.py index 5cb9282225..2c389538ef 100644 --- a/lib/spack/spack/test/mirror.py +++ b/lib/spack/spack/test/mirror.py @@ -23,10 +23,7 @@ from spack.stage import Stage from spack.util.executable import which from spack.util.spack_yaml import SpackYAMLError -pytestmark = [ - pytest.mark.not_on_windows("does not run on windows"), - pytest.mark.usefixtures("mutable_config", "mutable_mock_repo"), -] +pytestmark = [pytest.mark.usefixtures("mutable_config", "mutable_mock_repo")] # paths in repos that shouldn't be in the mirror tarballs. exclude = [".hg", ".git", ".svn"] @@ -273,8 +270,8 @@ def test_mirror_cache_symlinks(tmpdir): """Confirm that the cosmetic symlink created in the mirror cache (which may be relative) targets the storage path correctly. """ - cosmetic_path = "zlib/zlib-1.2.11.tar.gz" - global_path = "_source-cache/archive/c3/c3e5.tar.gz" + cosmetic_path = os.path.join("zlib", "zlib-1.2.11.tar.gz") + global_path = os.path.join("_source-cache", "archive", "c3", "c3e5.tar.gz") cache = spack.caches.MirrorCache(str(tmpdir), False) reference = spack.mirror.DefaultLayout(cosmetic_path, global_path) |