Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c5ce0a6d
Commit
c5ce0a6d
authored
Nov 27, 2020
by
Albert Salim
Committed by
Lin Jen-Shin
Nov 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memoize list of tests
parent
99382092
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
tooling/lib/tooling/parallel_rspec_runner.rb
tooling/lib/tooling/parallel_rspec_runner.rb
+6
-2
No files found.
tooling/lib/tooling/parallel_rspec_runner.rb
View file @
c5ce0a6d
...
...
@@ -11,6 +11,9 @@ require 'knapsack'
#
# Only the test files allocated by Knapsack and listed in the file
# would be executed in the CI node.
#
# Reference:
# https://github.com/ArturT/knapsack/blob/v1.20.0/lib/knapsack/runners/rspec_runner.rb
module
Tooling
class
ParallelRSpecRunner
def
self
.
run
(
rspec_args:
nil
,
filter_tests_file:
nil
)
...
...
@@ -54,7 +57,7 @@ module Tooling
def
tests_to_run
return
node_tests
if
filter_tests
.
empty?
node_tests
&
filter_tests
@tests_to_run
||=
node_tests
&
filter_tests
end
def
node_tests
...
...
@@ -62,7 +65,8 @@ module Tooling
end
def
filter_tests
filter_tests_file
?
tests_from_file
(
filter_tests_file
)
:
[]
@filter_tests
||=
filter_tests_file
?
tests_from_file
(
filter_tests_file
)
:
[]
end
def
tests_from_file
(
filter_tests_file
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment