Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.build
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
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.recipe.build
Commits
a968e4bb
Commit
a968e4bb
authored
Jan 16, 2019
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove all use of shell in subprocess
parent
639449fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
slapos/recipe/build/tests.py
slapos/recipe/build/tests.py
+5
-7
No files found.
slapos/recipe/build/tests.py
View file @
a968e4bb
...
...
@@ -62,8 +62,8 @@ class GitCloneNonInformativeTests(unittest.TestCase):
# Add submodule to main repo
submodule_dir_main_repo
=
os
.
path
.
join
(
self
.
project_dir
,
'dir1'
)
check_call
(
'git submodule add %s'
%
self
.
submodule_dir
,
cwd
=
submodule_dir_main_repo
,
shell
=
True
)
check_call
(
[
'git'
,
'submodule'
,
'add'
,
self
.
submodule_dir
]
,
cwd
=
submodule_dir_main_repo
)
self
.
gitCommit
(
self
.
project_dir
,
msg
=
'Add submodule repo'
)
def
tearDown
(
self
):
...
...
@@ -84,8 +84,8 @@ class GitCloneNonInformativeTests(unittest.TestCase):
"""
Setup user and email for given git repository
"""
check_call
(
"git config user.email 'test@example.com'"
,
cwd
=
proj_dir
,
shell
=
True
)
check_call
(
"git config user.name 'Test'"
,
cwd
=
proj_dir
,
shell
=
True
)
check_call
(
[
'git'
,
'config'
,
'user.email'
,
'test@example.com'
],
cwd
=
proj_dir
)
check_call
(
[
'git'
,
'config'
,
'user.name'
,
'Test'
],
cwd
=
proj_dir
)
def
gitAdd
(
self
,
proj_dir
,
update
=
False
):
"""runs a 'git add .' in the provided git repo
...
...
@@ -103,9 +103,7 @@ class GitCloneNonInformativeTests(unittest.TestCase):
:param proj_dir: path to a git repo
"""
try
:
check_call
(
'git commit -m "%s"'
%
msg
,
cwd
=
proj_dir
,
shell
=
True
)
check_call
([
'git'
,
'commit'
,
'-m'
,
msg
],
cwd
=
proj_dir
)
except
CalledProcessError
as
e
:
logging
.
error
(
"'git commit' failed with '%s'"
%
e
.
returncode
)
...
...
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