summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-07-21 15:54:58 +0200
committerRémy Coutable <remy@rymai.me>2017-08-11 14:55:10 +0200
commit7e3ff5a0beb64ca076f7e0af1d07e3c99775e426 (patch)
tree9d4b6a61a2b2f9703f88e4afbde7f883c4f29790 /scripts
parent8f8fd342313b0cd459d2fedb5b461b0cc063f248 (diff)
downloadgitlab-ce-7e3ff5a0beb64ca076f7e0af1d07e3c99775e426.tar.gz
Retrieve and sync flaky specs report from and to S3
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/detect-new-flaky-examples21
-rwxr-xr-xscripts/merge-reports2
2 files changed, 22 insertions, 1 deletions
diff --git a/scripts/detect-new-flaky-examples b/scripts/detect-new-flaky-examples
new file mode 100755
index 00000000000..3bee4f9a34b
--- /dev/null
+++ b/scripts/detect-new-flaky-examples
@@ -0,0 +1,21 @@
+#!/usr/bin/env ruby
+
+require 'json'
+
+report_file = ARGV.shift
+unless report_file
+ puts 'usage: detect-new-flaky-examples <report-file>'
+ exit 1
+end
+
+puts "Loading #{report_file}..."
+report = JSON.parse(File.read(report_file))
+
+if report.any?
+ puts "New flaky examples were detected!\n"
+ puts JSON.pretty_generate(report)
+ exit 1
+else
+ puts "No new flaky examples detected.\n"
+ exit 0
+end
diff --git a/scripts/merge-reports b/scripts/merge-reports
index aad76bcc327..3a421f1f1fc 100755
--- a/scripts/merge-reports
+++ b/scripts/merge-reports
@@ -4,7 +4,7 @@ require 'json'
main_report_file = ARGV.shift
unless main_report_file
- puts 'usage: merge_reports <main-report> [extra reports...]'
+ puts 'usage: merge-reports <main-report> [extra reports...]'
exit 1
end