diff --git a/testsuite/fixtures/toolchain_index/cr/crate_non_virt/crate_non_virt-1.0.0.toml b/testsuite/fixtures/toolchain_index/cr/crate_non_virt/crate_non_virt-1.0.0.toml new file mode 100644 index 000000000..3d2c273f3 --- /dev/null +++ b/testsuite/fixtures/toolchain_index/cr/crate_non_virt/crate_non_virt-1.0.0.toml @@ -0,0 +1,9 @@ +description = "A crate with no providers elsewhere" +name = "crate_non_virt" +version = "1.0.0" +maintainers = ["alejandro@mosteo.com"] +maintainers-logins = ["mylogin"] + +[origin] +url = "file:../../../crates/libhello_1.0.0.tgz" +hashes = ["sha512:99fa3a55540d0655c87605b54af732f76a8a363015f183b06e98aa91e54c0e69397872718c5c16f436dd6de0fba506dc50c66d34a0e5c61fb63cb01fa22f35ac"] diff --git a/testsuite/tests/build/hashes/compiler-input/test.py b/testsuite/tests/build/hashes/compiler-input/test.py index 14a7f4c9a..a22231b46 100644 --- a/testsuite/tests/build/hashes/compiler-input/test.py +++ b/testsuite/tests/build/hashes/compiler-input/test.py @@ -9,12 +9,14 @@ from drivers.builds import clear_builds_dir, hash_input from drivers import builds +target_crate = "crate_non_virt" + def check_hash(signature: str) -> None: """ Check that the given signature is present in the hash inputs """ - assert_match(f".*{signature}.*", hash_input("crate_real")) + assert_match(f".*{signature}.*", hash_input(target_crate)) # The first test is to check that the external compiler is used when no @@ -25,7 +27,7 @@ def check_hash(signature: str) -> None: # Init a crate without explicit compiler dependency init_local_crate("xxx") -alr_with("crate_real") # A regular crate in the index +alr_with(target_crate) # A regular crate in the index builds.sync() # Ensure the hash inputs are written to disk # Check the external compiler is in the hash inputs @@ -47,8 +49,8 @@ def check_hash(signature: str) -> None: # Next, check with an explicit compiler in the dependencies. Note that we give # the virtual dependency, but the actual native one is used for the hash. -clear_builds_dir() alr_with("gnat=7777") # Downgrade the compiler with an explicit dependency +clear_builds_dir() builds.sync() # Check the expected compiler is in the hash inputs diff --git a/testsuite/tests/solver/compiler-installed/test.py b/testsuite/tests/solver/compiler-installed/test.py index bed0c4c67..7a9edbb42 100644 --- a/testsuite/tests/solver/compiler-installed/test.py +++ b/testsuite/tests/solver/compiler-installed/test.py @@ -34,7 +34,7 @@ # Check that requesting a version different to the one externally available # results in a complete solution but with installation warning alr_with("gnat", delete=True, manual=False) -p = run_alr("with", f"gnat/={version}", quiet=False, force=True) +p = run_alr("with", f"gnat/={version}", quiet=False) assert_match(".*download of a toolchain not currently installed", p.out) match_solution(f"gnat=8888.0.0 (gnat_native) (origin: binary_archive)", escape=True)