debian-mirror-gitlab/scripts/generate-test-mapping

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
538 B
Text
Raw Normal View History

2021-01-29 00:20:46 +05:30
#!/usr/bin/env ruby
2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
2021-01-29 00:20:46 +05:30
require 'json'
require_relative '../tooling/lib/tooling/test_map_generator'
test_mapping_json = ARGV.shift
crystalball_yamls = ARGV
unless test_mapping_json && !crystalball_yamls.empty?
puts "usage: #{__FILE__} <test_mapping_json> [crystalball_yamls...]"
exit 1
end
map_generator = Tooling::TestMapGenerator.new
map_generator.parse(crystalball_yamls)
mapping = map_generator.mapping
File.write(test_mapping_json, JSON.pretty_generate(mapping))
puts "Saved #{test_mapping_json}."