@@ -367,40 +367,30 @@ end
367367 end
368368
369369 @testset " PackageSpec with version" begin
370+ platform = Platform (" x86_64" , " linux" ; libc= " musl" , cxxstring_abi= " cxx11" )
370371 # Install a dependency with a specific version number.
371- with_temp_project () do dir
372- prefix = Prefix (dir)
373- dependencies = [
374- PackageSpec (; name= " CMake_jll" , version = v " 3.24.3" )
375- ]
376- platform = Platform (" x86_64" , " linux" ; libc= " musl" , cxxstring_abi= " cxx11" )
377- if v " 1.9" <= VERSION < v " 1.11"
378- # For reasons I can't understand, in CI on GitHub Actions (and only
379- # there, can't reproduce the same behaviour locally) the error thrown
380- # inside the `setup_dependencies` "escapes" the `try` block. For lack of
381- # time to debug this stupid thing we just mark this step as broken and
382- # move on, it's really broken anyway.
383- @test false broken= true
384- else
385- try
386- test_setup_dependencies (prefix, dependencies, platform)
387- catch
388- if VERSION >= v " 1.9"
389- # This test is expected to be broken on Julia v1.9+
390- @test false broken= true
391- else
392- # For previous versions we don't expect errors and we
393- # want to see them.
394- rethrow ()
395- end
396- end
372+ @testset for version in (v " 3.24.3+0" , " 3.24.3" )
373+ with_temp_project () do dir
374+ prefix = Prefix (dir)
375+ dependencies = [
376+ PackageSpec (; name= " CMake_jll" , version = version)
377+ ]
378+ test_setup_dependencies (prefix, dependencies, platform)
379+ # The directory contains also executables from CMake dependencies.
380+ # Test will fail if `setup_dependencies` above failed.
381+ @test readdir (joinpath (destdir (dir, platform), " bin" )) == [" c_rehash" , " cmake" , " cpack" , " ctest" , " openssl" ] broken= VERSION >= v " 1.9"
382+ end
383+ end
384+ @testset " should error if build is missing from a specific VersionNumber" begin
385+ with_temp_project () do dir
386+ prefix = Prefix (dir)
387+ dependencies = [
388+ PackageSpec (; name= " CMake_jll" , version = v " 3.24.3" )
389+ ]
390+ @test_throws test_setup_dependencies (prefix, dependencies, platform)
397391 end
398- # The directory contains also executables from CMake dependencies.
399- # Test will fail if `setup_dependencies` above failed.
400- @test readdir (joinpath (destdir (dir, platform), " bin" )) == [" c_rehash" , " cmake" , " cpack" , " ctest" , " openssl" ] broken= VERSION >= v " 1.9"
401392 end
402393 end
403-
404394 end
405395end
406396
0 commit comments