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
4fafca23
Commit
4fafca23
authored
Dec 06, 2021
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't fail check_if_qa_only_spec_changes if changed_files.txt missing
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
18fc6343
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
tooling/bin/qa/check_if_qa_only_spec_changes
tooling/bin/qa/check_if_qa_only_spec_changes
+8
-4
No files found.
tooling/bin/qa/check_if_qa_only_spec_changes
View file @
4fafca23
...
...
@@ -6,13 +6,17 @@
# all the files are end-to-end test spec files.
abort
(
"ERROR: Please specify the file containing the list of changed files and a file where the qa only spec files will be written"
)
if
ARGV
.
size
!=
2
file_contents
=
File
.
read
(
ARGV
.
shift
).
split
(
' '
)
all_files_are_qa_specs
=
file_contents
.
all?
{
|
file_path
|
file_path
=~
%r{^qa
\/
qa
\/
specs
\/
features
\/
}
}
changed_files_path
=
ARGV
.
shift
output_file
=
ARGV
.
shift
return
unless
File
.
exist?
(
changed_files_path
)
changed_files
=
File
.
read
(
changed_files_path
).
split
(
' '
)
all_files_are_qa_specs
=
changed_files
.
all?
{
|
file_path
|
file_path
=~
%r{^qa
\/
qa
\/
specs
\/
features
\/
}
}
if
all_files_are_qa_specs
qa_spec_paths_trimmed
=
file_content
s
.
map
{
|
path
|
path
.
sub
(
'qa/'
,
''
)
}
qa_spec_paths_trimmed
=
changed_file
s
.
map
{
|
path
|
path
.
sub
(
'qa/'
,
''
)
}
File
.
write
(
output_file
,
qa_spec_paths_trimmed
.
join
(
' '
))
end
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