Skip to content

Conversation

@MSP-Greg
Copy link
Contributor

Recently there have been some issues in Ruby head with binstubs. The following output is from https://github.com/ruby/ruby-dev-builder/actions/runs/15884945465/job/44794519509:

Like to add test-unit to the CLI test, and having a version option makes for a simple check.

Run ruby test_files/cli_test.rb

───── CLI Test ─────────────────
bundle    ✅   2.7.0.dev
gem       ✅   3.7.0.dev
irb       ✅   1.15.2
racc      ✅   1.8.1
rake      ✅   13.3.0
rbs       ❌   missing binstub
rdbg      ❌   missing binstub
rdoc      ✅   6.14.1

ruby 3.5.0dev (2025-06-25T17:13:11Z :detached: a1996b32a9) +PRISM [x86_64-linux]

bad exit
Error: Process completed with exit code 1.

@kou
Copy link
Member

kou commented Jun 27, 2025

How about this?

diff --git a/lib/test/unit/autorunner.rb b/lib/test/unit/autorunner.rb
index 557b560..dafbba0 100644
--- a/lib/test/unit/autorunner.rb
+++ b/lib/test/unit/autorunner.rb
@@ -6,6 +6,7 @@ require_relative "priority"
 require_relative "attribute-matcher"
 require_relative "testcase"
 require_relative "test-suite-thread-runner"
+require_relative "version"
 
 module Test
   module Unit
@@ -206,6 +207,8 @@ module Test
 
       def options
         @options ||= OptionParser.new do |o|
+          o.version = VERSION
+
           o.banner = "Test::Unit automatic runner."
           o.banner += "\nUsage: #{$0} [options] [-- untouched arguments]"
 

Co-authored-by: Sutou Kouhei <kou@clear-code.com>
@MSP-Greg
Copy link
Contributor Author

@kou

Thanks for the suggestion. I didn't know that OptionParser would handle version that way. Revised...

@kou kou merged commit df171be into test-unit:master Jun 28, 2025
36 checks passed
@kou kou mentioned this pull request Jun 28, 2025
@tikkss
Copy link
Contributor

tikkss commented Jun 30, 2025

@MSP-Greg test-unit 3.6.9 has been released. Please check it out!

@MSP-Greg
Copy link
Contributor Author

@tikkss & @kou

Thanks for quick release. When https://github.com/ruby/ruby/blob/master/gems/bundled_gems is updated, we'll update scripts that check for the test-unit binstub.

@MSP-Greg MSP-Greg deleted the 00-cli-version branch June 30, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants