summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qa/qa/scenario/entrypoint.rb10
-rw-r--r--qa/qa/specs/runner.rb9
2 files changed, 15 insertions, 4 deletions
diff --git a/qa/qa/scenario/entrypoint.rb b/qa/qa/scenario/entrypoint.rb
index e58bb53f88a..33cb2696f8f 100644
--- a/qa/qa/scenario/entrypoint.rb
+++ b/qa/qa/scenario/entrypoint.rb
@@ -9,8 +9,8 @@ module QA
@tags = tags
end
- def self.tag_switches
- @tags.map { |tag| ['-t', tag.to_s] }
+ def self.get_tags
+ @tags
end
def perform(address, *files)
@@ -24,7 +24,11 @@ module QA
Runtime::Release.perform_before_hooks
Specs::Runner.perform do |specs|
- specs.rspec('--tty', self.class.tag_switches, files.any? ? files : 'qa/specs/features')
+ specs.rspec(
+ tty: true,
+ tags: self.class.get_tags,
+ files: files.any? ? files : 'qa/specs/features'
+ )
end
end
end
diff --git a/qa/qa/specs/runner.rb b/qa/qa/specs/runner.rb
index 83ae15d0995..2aa18d5d3a1 100644
--- a/qa/qa/specs/runner.rb
+++ b/qa/qa/specs/runner.rb
@@ -5,7 +5,14 @@ module QA
class Runner
include Scenario::Actable
- def rspec(*args)
+ def rspec(tty: false, tags: [], files: ['qa/specs/features'])
+ args = []
+ args << '--tty' if tty
+ tags.to_a.each do |tag|
+ args << ['-t', tag.to_s]
+ end
+ args << files
+
RSpec::Core::Runner.run(args.flatten, $stderr, $stdout).tap do |status|
abort if status.nonzero?
end