File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -28,15 +28,9 @@ def install
2828 system "cargo" , "install" , *std_cargo_args ( path : "crates/bin" )
2929 end
3030
31- def check_binary_linkage ( binary , library )
32- binary . dynamically_linked_libraries . any? do |dll |
33- next false unless dll . start_with? ( HOMEBREW_PREFIX . to_s )
34-
35- File . realpath ( dll ) == File . realpath ( library )
36- end
37- end
38-
3931 test do
32+ require "utils/linkage"
33+
4034 assert_match version . to_s , shell_output ( "#{ bin } /yozf --version" )
4135
4236 output = shell_output ( "#{ bin } /yozf config get a 2>&1" , 1 )
@@ -46,7 +40,7 @@ def check_binary_linkage(binary, library)
4640 Formula [ "openssl@3" ] . opt_lib /shared_library ( "libssl" ) ,
4741 Formula [ "openssl@3" ] . opt_lib /shared_library ( "libcrypto" ) ,
4842 ] . each do |library |
49- assert check_binary_linkage ( bin /"yozf" , library ) ,
43+ assert Utils . binary_linked_to_library? ( bin /"yozf" , library ) ,
5044 "No linkage with #{ library . basename } ! Cargo is likely using a vendored version."
5145 end
5246 end
You can’t perform that action at this time.
0 commit comments