diff options
author | Nicole C. <48625123+nicolecheetham@users.noreply.github.com> | 2024-08-12 15:50:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-12 15:50:51 -0400 |
commit | 27557a133ba2ad5c1fd5c874006f264693b4716b (patch) | |
tree | e064dc5eebc7f61b1b12ce1e397a875adcb36d06 /lib | |
parent | 78810e95eddd9cd50bfa6c206283855377cfb45c (diff) | |
download | spack-27557a133ba2ad5c1fd5c874006f264693b4716b.tar.gz spack-27557a133ba2ad5c1fd5c874006f264693b4716b.tar.bz2 spack-27557a133ba2ad5c1fd5c874006f264693b4716b.tar.xz spack-27557a133ba2ad5c1fd5c874006f264693b4716b.zip |
debug: Update cmd and test for Windows (#45309)
* debug: Update cmd and test for Windows
* Add comment tar options not supported by Win tar
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/debug.py | 4 | ||||
-rw-r--r-- | lib/spack/spack/test/cmd/debug.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/cmd/debug.py b/lib/spack/spack/cmd/debug.py index c4b5b427ad..b1d33eb67d 100644 --- a/lib/spack/spack/cmd/debug.py +++ b/lib/spack/spack/cmd/debug.py @@ -6,6 +6,7 @@ import os import platform import re +import sys from datetime import datetime from glob import glob @@ -62,9 +63,10 @@ def create_db_tarball(args): base = os.path.basename(str(spack.store.STORE.root)) transform_args = [] + # Currently --transform and -s are not supported by Windows native tar if "GNU" in tar("--version", output=str): transform_args = ["--transform", "s/^%s/%s/" % (base, tarball_name)] - else: + elif sys.platform != "win32": transform_args = ["-s", "/^%s/%s/" % (base, tarball_name)] wd = os.path.dirname(str(spack.store.STORE.root)) diff --git a/lib/spack/spack/test/cmd/debug.py b/lib/spack/spack/test/cmd/debug.py index 1d29f44168..55d0928fbd 100644 --- a/lib/spack/spack/test/cmd/debug.py +++ b/lib/spack/spack/test/cmd/debug.py @@ -16,8 +16,6 @@ from spack.util.executable import which debug = SpackCommand("debug") -pytestmark = pytest.mark.not_on_windows("does not run on windows") - @pytest.mark.db def test_create_db_tarball(tmpdir, database): |