From: KITAITI Makoto Date: Tue, 29 Oct 2024 06:45:37 +0000 (+0900) Subject: ruby : fix installation test (#2519) X-Git-Tag: upstream/1.7.4~317 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=850f7b19d35ca46799a6386112a6073b2b70c9eb;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp ruby : fix installation test (#2519) --- diff --git a/bindings/ruby/tests/test_package.rb b/bindings/ruby/tests/test_package.rb index 3183c295..f51eab57 100644 --- a/bindings/ruby/tests/test_package.rb +++ b/bindings/ruby/tests/test_package.rb @@ -18,11 +18,13 @@ class TestPackage < Test::Unit::TestCase end def test_install - filename = `rake -Tbuild`.match(/(whispercpp-(?:.+)\.gem)/)[1] + match_data = `rake -Tbuild`.match(/(whispercpp-(.+)\.gem)/) + filename = match_data[1] + version = match_data[2] basename = "whisper.#{RbConfig::CONFIG["DLEXT"]}" Dir.mktmpdir do |dir| system "gem", "install", "--install-dir", dir.shellescape, "pkg/#{filename.shellescape}", exception: true - assert_path_exist File.join(dir, "gems/whispercpp-1.3.0/lib", basename) + assert_path_exist File.join(dir, "gems/whispercpp-#{version}/lib", basename) end end end