KEMBAR78
Launchable: Start recording test-spec results by ono-max · Pull Request #12302 · ruby/ruby · GitHub
Skip to content

Conversation

@ono-max
Copy link
Member

@ono-max ono-max commented Dec 10, 2024

  • Introduce --launchable-test-reports option in test-spec.
  • Start recording test-spec results in the workflows that Launchable are integrated.

@ono-max ono-max force-pushed the test-spec-launchable branch 4 times, most recently from b677d9b to 26575eb Compare December 10, 2024 06:43
@launchable-app

This comment has been minimized.

@launchable-app
Copy link

All Tests passed!

✖️no tests failed ✔️32115 tests passed(1 flake)

1 similar comment
@launchable-app
Copy link

All Tests passed!

✖️no tests failed ✔️32115 tests passed(1 flake)

@ono-max ono-max force-pushed the test-spec-launchable branch from b2a37bc to 87f75a3 Compare December 12, 2024 05:33
@ono-max ono-max force-pushed the test-spec-launchable branch from 87f75a3 to 288d65b Compare December 12, 2024 05:59
@ono-max ono-max marked this pull request as ready for review December 12, 2024 07:31
@ono-max ono-max merged commit 46e8a26 into ruby:master Dec 12, 2024
81 checks passed
@ono-max ono-max deleted the test-spec-launchable branch December 12, 2024 07:33
@@ -0,0 +1,88 @@
module LaunchableFormatter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, it would have been good to make a PR to https://github.com/ruby/mspec or to add a MSpec maintainer as a reviewer of this PR to review this addition

obj.init
end

def self.setDir(dir)
Copy link
Member

@eregon eregon Feb 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setDir is un-Ruby-like,
Also we should avoid class variables in MSpec (some early Ruby implementations might not support them, and they have weird semantics).
How about:

class << self
  attr_accessor :dir
end

def finish
super

require_relative '../../../../../../tool/lib/launchable'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is effectively specific to ruby/ruby and this file can only load in ruby/ruby (so https://github.com/ruby/mspec/blob/master/lib/mspec/runner/formatters/launchable.rb is kinda dead code except when used in CRuby) I think it would be best to have this formatter outside mspec, using this existing mechanism taking a formatter path: https://github.com/ruby/mspec/blob/0aabb3e548eb5ea6cad0125f8f46cee34542b6b7/lib/mspec/utils/options.rb#L298-L303

Also note there is already logic to extend the formatter in spec/default.mspec, maybe that could also be used.

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.

2 participants