summaryrefslogtreecommitdiff
path: root/scripts/merge-html-reports
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/merge-html-reports')
-rwxr-xr-xscripts/merge-html-reports13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/merge-html-reports b/scripts/merge-html-reports
index da4fcc07095..7d1e15186c8 100755
--- a/scripts/merge-html-reports
+++ b/scripts/merge-html-reports
@@ -4,7 +4,13 @@ require 'nokogiri'
main_report_file = ARGV.shift
unless main_report_file
- puts 'usage: merge-html-reports <main-report> [extra reports...]'
+ puts 'usage: merge-html-reports <main-report> <base-artifact-url> [parallel reports...]'
+ exit 1
+end
+
+base_artifact_url = ARGV.shift
+unless base_artifact_url
+ puts 'usage: merge-html-reports <main-report> <base-artifact-url> [parallel reports...]'
exit 1
end
@@ -17,6 +23,11 @@ new_report.at_css('head').add_next_sibling(empty_body)
ARGV.each do |report_file|
report = Nokogiri::HTML.parse(File.read(report_file))
+ report.css('a').each do |link|
+ link_suffix = link['href'].slice(19..-1)
+ link['href'] = base_artifact_url + link_suffix
+ end
+
header = report.css('div #rspec-header')
tests = report.css('dt[id^="example_group_"]')