Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
steam-runtime-tools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
steamrt
steam-runtime-tools
Commits
a426ee8d
Commit
a426ee8d
authored
4 years ago
by
Simon McVittie
Browse files
Options
Downloads
Plain Diff
Merge branch 'wip/no-runtime' into 'master'
Fix and test launching without --runtime See merge request
!177
parents
c0341ac4
0e024097
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!177
Fix and test launching without --runtime
Pipeline
#5347
canceled
4 years ago
Stage: build
Stage: relocatable-install
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pressure-vessel/wrap.c
+1
-1
1 addition, 1 deletion
pressure-vessel/wrap.c
tests/pressure-vessel/containers.py
+42
-0
42 additions, 0 deletions
tests/pressure-vessel/containers.py
with
43 additions
and
1 deletion
pressure-vessel/wrap.c
+
1
−
1
View file @
a426ee8d
...
...
@@ -331,7 +331,7 @@ export_contents_of_run (FlatpakBwrap *bwrap,
g_return_val_if_fail
(
bwrap
!=
NULL
,
FALSE
);
g_return_val_if_fail
(
error
==
NULL
||
*
error
==
NULL
,
FALSE
);
g_return_val_if_fail
(
g_file_test
(
"/.flatpak-info"
,
G_FILE_TEST_
EXISTS
),
g_return_val_if_fail
(
!
g_file_test
(
"/.flatpak-info"
,
G_FILE_TEST_
IS_REGULAR
),
FALSE
);
dir
=
g_dir_open
(
"/run"
,
0
,
error
);
...
...
This diff is collapsed.
Click to expand it.
tests/pressure-vessel/containers.py
+
42
−
0
View file @
a426ee8d
...
...
@@ -115,6 +115,7 @@ logger = logging.getLogger('test-containers')
class
TestContainers
(
BaseTest
):
bwrap
=
None
# type: typing.Optional[str]
containers_dir
=
''
host_srsi
=
None
# type: typing.Optional[str]
host_srsi_parsed
=
{}
# type: typing.Dict[str, typing.Any]
pv_dir
=
''
pv_wrap
=
''
...
...
@@ -295,6 +296,8 @@ class TestContainers(BaseTest):
if
host_srsi
is
None
:
host_srsi
=
shutil
.
which
(
'
steam-runtime-system-info
'
)
cls
.
host_srsi
=
host_srsi
if
host_srsi
is
not
None
:
with
open
(
os
.
path
.
join
(
cls
.
artifacts
,
'
host-srsi.json
'
),
...
...
@@ -345,6 +348,7 @@ class TestContainers(BaseTest):
cls
=
self
.
__class__
self
.
bwrap
=
cls
.
bwrap
self
.
containers_dir
=
cls
.
containers_dir
self
.
host_srsi
=
cls
.
host_srsi
self
.
host_srsi_parsed
=
cls
.
host_srsi_parsed
self
.
pv_dir
=
cls
.
pv_dir
self
.
pv_wrap
=
cls
.
pv_wrap
...
...
@@ -1042,6 +1046,44 @@ class TestContainers(BaseTest):
with
self
.
subTest
(
'
transient
'
):
self
.
_test_soldier
(
'
soldier
'
,
soldier
)
def
test_no_runtime
(
self
)
->
None
:
if
self
.
bwrap
is
None
:
self
.
skipTest
(
'
Unable to run bwrap (in a container?)
'
)
artifacts
=
os
.
path
.
join
(
self
.
artifacts
,
'
no-runtime
'
,
)
os
.
makedirs
(
artifacts
,
exist_ok
=
True
)
bwrap_temp_file
=
os
.
path
.
join
(
self
.
artifacts
,
'
bwrap-args
'
)
argv
=
[
self
.
pv_wrap
,
'
--verbose
'
,
'
--write-bwrap-arguments
'
,
bwrap_temp_file
,
]
var
=
os
.
path
.
join
(
self
.
containers_dir
,
'
var
'
)
os
.
makedirs
(
var
,
exist_ok
=
True
)
with
open
(
os
.
path
.
join
(
artifacts
,
'
srsi.json
'
),
'
w
'
)
as
writer
:
completed
=
self
.
run_subprocess
(
argv
+
[
'
--
'
,
'
env
'
,
'
LD_BIND_NOW=1
'
,
self
.
host_srsi
or
'
true
'
,
'
--verbose
'
,
],
cwd
=
artifacts
,
stdout
=
writer
,
stderr
=
2
,
universal_newlines
=
True
,
)
self
.
assertEqual
(
completed
.
returncode
,
0
)
if
__name__
==
'
__main__
'
:
assert
sys
.
version_info
>=
(
3
,
4
),
\
...
...
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