Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/flaky_examples/prune-old-flaky-examples')
-rwxr-xr-xscripts/flaky_examples/prune-old-flaky-examples17
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/flaky_examples/prune-old-flaky-examples b/scripts/flaky_examples/prune-old-flaky-examples
index a5b50a7e8ea..fc31f0f6996 100755
--- a/scripts/flaky_examples/prune-old-flaky-examples
+++ b/scripts/flaky_examples/prune-old-flaky-examples
@@ -1,15 +1,17 @@
#!/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
+ source 'https://rubygems.org'
+
+ 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 +22,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)