spack verify: use --fake in test installs

This commit is contained in:
Massimiliano Culpo 2025-02-24 13:14:36 +01:00
parent 9fb5878ebb
commit de51c6b894
No known key found for this signature in database
GPG Key ID: 3E52BB992233066C

View File

@ -103,8 +103,7 @@ def test_single_spec_verify_cmd(tmpdir, mock_packages, mock_archive, mock_fetch,
def test_libraries(tmp_path, install_mockery, mock_fetch): def test_libraries(tmp_path, install_mockery, mock_fetch):
gcc = spack.util.executable.which("gcc", required=True) gcc = spack.util.executable.which("gcc", required=True)
s = spack.concretize.concretize_one("libelf") s = spack.concretize.concretize_one("libelf")
spack.installer.PackageInstaller([s.package]).install() spack.installer.PackageInstaller([s.package], fake=True).install()
os.mkdir(s.prefix.bin)
# There are no ELF files so the verification should pass # There are no ELF files so the verification should pass
verify("libraries", f"/{s.dag_hash()}") verify("libraries", f"/{s.dag_hash()}")