This commit is contained in:
Benoit Daloze 2025-10-08 17:59:51 +02:00
parent a0c6efdea4
commit 5e7e604093
4 changed files with 21 additions and 3 deletions

View File

@ -18,6 +18,7 @@ class MSpecCI < MSpecScript
options.chdir
options.prefix
options.configure { |f| load f }
options.repeat
options.pretend
options.interrupt
options.timeout

View File

@ -78,6 +78,11 @@ RSpec.describe MSpecCI, "#options" do
@script.options []
end
it "enables the repeat option" do
expect(@options).to receive(:repeat)
@script.options @argv
end
it "calls #custom_options" do
expect(@script).to receive(:custom_options).with(@options)
@script.options []

View File

@ -105,6 +105,11 @@ RSpec.describe MSpecRun, "#options" do
@script.options @argv
end
it "enables the repeat option" do
expect(@options).to receive(:repeat)
@script.options @argv
end
it "exits if there are no files to process and './spec' is not a directory" do
expect(File).to receive(:directory?).with("./spec").and_return(false)
expect(@options).to receive(:parse).and_return([])

View File

@ -3,7 +3,7 @@
IMPLS = {
truffleruby: {
git: "https://github.com/oracle/truffleruby.git",
git: "https://github.com/truffleruby/truffleruby.git",
from_commit: "f10ab6988d",
},
jruby: {
@ -34,6 +34,13 @@ raise RUBYSPEC_REPO unless Dir.exist?(RUBYSPEC_REPO)
SOURCE_REPO = MSPEC ? MSPEC_REPO : RUBYSPEC_REPO
# LAST_MERGE is a commit of ruby/spec or ruby/mspec
# which is the spec/mspec commit that was last imported in the Ruby implementation
# (i.e. the commit in "Update to ruby/spec@commit").
# It is normally automatically computed, but can be manually set when
# e.g. the last update of specs wasn't merged in the Ruby implementation.
LAST_MERGE = ENV["LAST_MERGE"]
NOW = Time.now
BRIGHT_RED = "\e[31;1m"
@ -142,8 +149,8 @@ def rebase_commits(impl)
else
sh "git", "checkout", impl.name
if ENV["LAST_MERGE"]
last_merge = `git log -n 1 --format='%H %ct' #{ENV["LAST_MERGE"]}`
if LAST_MERGE
last_merge = `git log -n 1 --format='%H %ct' #{LAST_MERGE}`
else
last_merge = `git log --grep='^#{impl.last_merge_message}' -n 1 --format='%H %ct'`
end