summaryrefslogtreecommitdiff
path: root/qa/qa/specs/runner.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-09-07 00:52:29 +0200
committerRémy Coutable <remy@rymai.me>2018-09-07 00:55:07 +0200
commitdd85ea6a9dad26acbf8add2777f53faa1cd1ef1b (patch)
tree965eeecb0364db9f49dea9eefe4b7d1e57e55ce7 /qa/qa/specs/runner.rb
parent13202722c8f20e0c7ef1d51e374c79776e43c466 (diff)
downloadgitlab-ce-dd85ea6a9dad26acbf8add2777f53faa1cd1ef1b.tar.gz
[QA] Fix arguments passed to RSpec::Core::Runner
- When -t or --tag are passed, we shouldn't exclude the :orchestrated tag - When test path is passed, we shouldn't append the default test path Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'qa/qa/specs/runner.rb')
-rw-r--r--qa/qa/specs/runner.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/qa/qa/specs/runner.rb b/qa/qa/specs/runner.rb
index 5b5699d8a93..fea0ef94df3 100644
--- a/qa/qa/specs/runner.rb
+++ b/qa/qa/specs/runner.rb
@@ -5,10 +5,12 @@ module QA
class Runner < Scenario::Template
attr_accessor :tty, :tags, :options
+ DEFAULT_TEST_PATH_ARGS = ['--', File.expand_path('./features', __dir__)].freeze
+
def initialize
@tty = false
@tags = []
- @options = [File.expand_path('./features', __dir__)]
+ @options = []
end
def perform
@@ -18,10 +20,11 @@ module QA
if tags.any?
tags.each { |tag| args.push(['--tag', tag.to_s]) }
else
- args.push(%w[--tag ~orchestrated])
+ args.push(%w[--tag ~orchestrated]) unless (%w[-t --tag] & options).any?
end
args.push(options)
+ args.push(DEFAULT_TEST_PATH_ARGS) unless options.any? { |opt| opt =~ %r{/features/} }
Runtime::Browser.configure!