summaryrefslogtreecommitdiff
path: root/scripts/merge-html-reports
diff options
context:
space:
mode:
authorDesiree Chevalier <dchevalier@gitlab.com>2019-06-24 13:42:56 -0400
committerDesiree Chevalier <dchevalier@gitlab.com>2019-07-15 11:05:36 -0400
commit1cf29959550b98d38a2190c188e7e0e201f4f203 (patch)
tree8254e465bdb2e473f71812d791471684d8438b92 /scripts/merge-html-reports
parent8fbdbbb88f3ebfd805ead75befcc502bc1870013 (diff)
downloadgitlab-ce-qa-review-knapsack-reports-testing.tar.gz
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_"]')