Fix failing test
This commit is contained in:
parent
200191cc3d
commit
9fe2796e9d
@ -196,7 +196,7 @@ def test_buildcache_autopush(tmp_path, install_mockery, mock_fetch):
|
|||||||
|
|
||||||
|
|
||||||
def test_buildcache_exclude(tmp_path, install_mockery, mock_fetch):
|
def test_buildcache_exclude(tmp_path, install_mockery, mock_fetch):
|
||||||
"""Test buildcache with autopush"""
|
"""Test buildcache with autopush can exclude"""
|
||||||
mirror_dir = tmp_path / "mirror_a"
|
mirror_dir = tmp_path / "mirror_a"
|
||||||
|
|
||||||
mirror(
|
mirror(
|
||||||
@ -213,12 +213,18 @@ def test_buildcache_exclude(tmp_path, install_mockery, mock_fetch):
|
|||||||
|
|
||||||
# Install and generate build cache index
|
# Install and generate build cache index
|
||||||
PackageInstaller([s.package], fake=True, explicit=True).install()
|
PackageInstaller([s.package], fake=True, explicit=True).install()
|
||||||
|
found_file = URLBuildcacheEntry.get_manifest_filename(s)
|
||||||
|
missing_file = URLBuildcacheEntry.get_manifest_filename(s["libelf"])
|
||||||
|
found_dirs = os.path.join(
|
||||||
|
*URLBuildcacheEntry.get_relative_path_components(BuildcacheComponent.SPEC), s.name
|
||||||
|
)
|
||||||
|
missing_dirs = os.path.join(
|
||||||
|
*URLBuildcacheEntry.get_relative_path_components(BuildcacheComponent.SPEC),
|
||||||
|
s["libelf"].name,
|
||||||
|
)
|
||||||
|
|
||||||
missing_file = spack.binary_distribution.tarball_name(s["libelf"], ".spec.json")
|
assert (mirror_dir / found_dirs / found_file).exists()
|
||||||
found_file = spack.binary_distribution.tarball_name(s, ".spec.json")
|
assert not (mirror_dir / missing_dirs / missing_file).exists()
|
||||||
|
|
||||||
assert (mirror_dir / "build_cache" / found_file).exists()
|
|
||||||
assert not (mirror_dir / "build_cache" / missing_file).exists()
|
|
||||||
|
|
||||||
|
|
||||||
def test_buildcache_sync(
|
def test_buildcache_sync(
|
||||||
|
Loading…
Reference in New Issue
Block a user