diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-11 18:08:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-11 18:08:47 +0300 |
commit | f4ad4d190044bd14fe4caec25b1a219887bc752f (patch) | |
tree | c2c185f73ea65906018324034149f43e4d1a366c /scripts/flaky_examples | |
parent | bcd11d993d80d46053a97ee3b0344ed4d2b4571b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/flaky_examples')
-rwxr-xr-x | scripts/flaky_examples/prune-old-flaky-examples | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/flaky_examples/prune-old-flaky-examples b/scripts/flaky_examples/prune-old-flaky-examples index a5b50a7e8ea..24964cbf4df 100755 --- a/scripts/flaky_examples/prune-old-flaky-examples +++ b/scripts/flaky_examples/prune-old-flaky-examples @@ -1,15 +1,15 @@ #!/usr/bin/env ruby # frozen_string_literal: true -# tooling/rspec_flaky/flaky_examples_collection.rb is requiring -# `active_support/hash_with_indifferent_access`, and we install the `activesupport` -# gem manually on the CI -require 'rubygems' -require_relative '../../tooling/rspec_flaky/report' +require 'bundler/inline' + +gemfile do + gem 'rspec_flaky', path: 'gems/rspec_flaky' +end report_file = ARGV.shift unless report_file - puts 'usage: prune-old-flaky-specs <report-file> <new-report-file>' + puts "usage: #{__FILE__} <report-file> <new-report-file>" exit 1 end @@ -20,5 +20,6 @@ puts "Current report has #{report.size} entries." new_report = report.prune_outdated -puts "New report has #{new_report.size} entries: #{report.size - new_report.size} entries older than #{RspecFlaky::Report::OUTDATED_DAYS_THRESHOLD} days were removed." +puts "New report has #{new_report.size} entries: #{report.size - new_report.size} entries older than " \ + "#{RspecFlaky::Report::OUTDATED_DAYS_THRESHOLD} days were removed." puts "Saved #{new_report_file}." if new_report.write(new_report_file) |