Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SA3
SA3LI Trial
Commits
872b6010
Commit
872b6010
authored
Apr 07, 2021
by
canterburym
Browse files
Making merge test less verbose
parent
a19c047b
Pipeline
#3176
passed with stages
in 1 minute and 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
testing/dockerfile
testing/dockerfile
+1
-1
testing/merge_test.py
testing/merge_test.py
+5
-4
No files found.
testing/dockerfile
View file @
872b6010
...
...
@@ -3,5 +3,5 @@
FROM
python:3.8
RUN
apt update
&&
apt-get
install
-y
git
RUN
git config
--global
user.name
"forgeRobot"
&&
git config
--global
user.email
"forgeRobot@example.com"
RUN
pip3
install
-q
asn1tools lxml xmlschema requests gitpython
\ No newline at end of file
testing/merge_test.py
View file @
872b6010
...
...
@@ -16,11 +16,11 @@ def gapi (query):
return
json
.
loads
(
r
.
text
)
def
do
(
commandline
):
print
(
" Attempting: "
+
commandline
)
#
print (" Attempting: " + commandline)
completedProc
=
subprocess
.
run
(
commandline
,
capture_output
=
True
,
shell
=
True
)
print
(
" STDOUT > "
+
(
"empty"
if
completedProc
.
stdout
is
None
else
completedProc
.
stdout
.
decode
(
'utf-8'
)))
print
(
" STDERR > "
+
(
"empty"
if
completedProc
.
stderr
is
None
else
completedProc
.
stderr
.
decode
(
'utf-8'
)))
print
(
f
" Completed with code
{
completedProc
.
returncode
}
"
)
#
print (" STDOUT > " + ("empty" if completedProc.stdout is None else completedProc.stdout.decode('utf-8')))
#
print (" STDERR > " + ("empty" if completedProc.stderr is None else completedProc.stderr.decode('utf-8')))
#
print (f" Completed with code {completedProc.returncode}")
return
(
completedProc
.
returncode
==
0
,
completedProc
.
stdout
.
decode
(
'utf-8'
))
print
(
"Searching for corresponding MR..."
)
...
...
@@ -45,6 +45,7 @@ mrs = [m for m in mrs if m['reference'] != mr['reference']]
print
(
f
"
{
len
(
mrs
)
}
MRs found"
)
mergeConflicts
=
{}
for
mr
in
mrs
:
source_branch
=
mr
[
'source_branch'
]
print
(
source_branch
)
...
...
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