Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
db57bc01
Commit
db57bc01
authored
4 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Rename tester systemd files | refs
#33815
parent
e34c268a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/systemd/envsetup-tester.service
+0
-0
0 additions, 0 deletions
tests/systemd/envsetup-tester.service
tests/systemd/envsetup-tester.timer
+0
-0
0 additions, 0 deletions
tests/systemd/envsetup-tester.timer
tests/utilities/systemd.py
+13
-6
13 additions, 6 deletions
tests/utilities/systemd.py
with
13 additions
and
6 deletions
tests/systemd/envsetup-test
s
.service
→
tests/systemd/envsetup-test
er
.service
+
0
−
0
View file @
db57bc01
File moved
This diff is collapsed.
Click to expand it.
tests/systemd/envsetup-test
s
.timer
→
tests/systemd/envsetup-test
er
.timer
+
0
−
0
View file @
db57bc01
File moved
This diff is collapsed.
Click to expand it.
tests/utilities/systemd.py
+
13
−
6
View file @
db57bc01
...
...
@@ -17,20 +17,27 @@ def check_systemd_setup():
'''
# Remove old files
deprecated_files
=
(
'
/lib/systemd/system/envsetup-tests.service
'
,
'
/lib/systemd/system/envsetup-tests.timer
'
,
'
/etc/systemd/system/envsetup-tests.service
'
,
'
/etc/systemd/system/envsetup-tests.timer
'
,
'
/etc/systemd/system/ubicast-config.service
'
)
for
path
in
deprecated_files
:
if
os
.
path
.
exists
(
path
):
# Disable service/timer
name
=
path
.
rsplit
(
'
/
'
,
1
)[
-
1
]
subprocess
.
run
([
'
systemctl
'
,
'
disable
'
,
name
])
subprocess
.
run
([
'
systemctl
'
,
'
stop
'
,
name
])
# Remove service/timer
os
.
remove
(
path
)
print
(
'
Removed deprecated file:
"
%s
"
.
'
%
path
)
# Write systemd files if needed
template_dir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))),
'
systemd
'
)
files_to_write
=
(
(
'
/lib/systemd/system/envsetup-test
s
.service
'
,
os
.
path
.
join
(
template_dir
,
'
envsetup-test
s
.service
'
)),
(
'
/lib/systemd/system/envsetup-test
s
.timer
'
,
os
.
path
.
join
(
template_dir
,
'
envsetup-test
s
.timer
'
)),
(
'
/lib/systemd/system/envsetup-test
er
.service
'
,
os
.
path
.
join
(
template_dir
,
'
envsetup-test
er
.service
'
)),
(
'
/lib/systemd/system/envsetup-test
er
.timer
'
,
os
.
path
.
join
(
template_dir
,
'
envsetup-test
er
.timer
'
)),
)
for
path
,
template
in
files_to_write
:
content
=
''
...
...
@@ -50,8 +57,8 @@ def check_systemd_setup():
# Enable systemd timer if needed
if
get_conf
(
'
TESTER_ENABLE_SYSTEMD_TIMER
'
)
==
'
1
'
:
print
(
'
Checking status of envsetup systemd timer...
'
)
p
=
subprocess
.
run
([
'
systemctl
'
,
'
is-enabled
'
,
'
envsetup-test
s
.timer
'
])
p
=
subprocess
.
run
([
'
systemctl
'
,
'
is-enabled
'
,
'
envsetup-test
er
.timer
'
])
if
p
.
returncode
!=
0
:
subprocess
.
run
([
'
systemctl
'
,
'
enable
'
,
'
envsetup-test
s
.timer
'
])
subprocess
.
run
([
'
systemctl
'
,
'
restart
'
,
'
envsetup-test
s
.timer
'
])
print
(
'
Enabled
"
envsetup-test
s
.timer
"
in systemd.
'
)
subprocess
.
run
([
'
systemctl
'
,
'
enable
'
,
'
envsetup-test
er
.timer
'
])
subprocess
.
run
([
'
systemctl
'
,
'
restart
'
,
'
envsetup-test
er
.timer
'
])
print
(
'
Enabled
"
envsetup-test
er
.timer
"
in systemd.
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment