Skip to content

Commit b355cd0

Browse files
author
Vasileios Karakasis
authored
Merge pull request #1008 from vkarak/doc/fix-container-example
[doc] Fix syntax of container tutorial example
2 parents 267a8e5 + 153105b commit b355cd0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

docs/advanced.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ The following example shows a simple test that runs some basic commands inside a
465465
A container-based test in ReFrame requires that the :attr:`container_platform <reframe.core.pipeline.RegressionTest.container_platform>` is set:
466466

467467
.. literalinclude:: ../tutorial/advanced/advanced_example10.py
468-
:lines: 13
468+
:lines: 12
469469

470470
This attribute accepts a string that corresponds to the name of the platform and it instantiates the appropriate :class:`ContainerPlatform <reframe.core.containers.ContainerPlatform>` object behind the scenes.
471471
In this case, the test will be using `Singularity <https://sylabs.io>`__ as a container platform.
@@ -475,7 +475,7 @@ For a complete list of supported container platforms, the user is referred to th
475475
As soon as the container platform to be used is defined, you need to specify the container image to use and the commands to run inside the container:
476476

477477
.. literalinclude:: ../tutorial/advanced/advanced_example10.py
478-
:lines: 14-17
478+
:lines: 13-16
479479

480480
These two attributes are mandatory for container-based check.
481481
The :attr:`image <reframe.core.pipeline.RegressionTest.container_platform.image>` attribute specifies the name of an image from a registry, whereas the :attr:`commands <reframe.core.pipeline.RegressionTest.container_platform.commands>` attribute provides the list of commands to be run inside the container.
@@ -494,7 +494,7 @@ Once the commands are executed, the container is stopped and ReFrame goes on wit
494494
Users may also change the default mount point of the stage directory by using :attr:`workdir <reframe.core.pipeline.RegressionTest.container_platform.workdir>` attribute:
495495

496496
.. literalinclude:: ../tutorial/advanced/advanced_example10.py
497-
:lines: 18
497+
:lines: 17
498498

499499
Besides the stage directory, additional mount points can be specified through the :attr:`mount_points <reframe.core.pipeline.RegressionTest.container_platform.mount_points>` attribute:
500500

tutorial/advanced/advanced_example10.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
@rfm.required_version('>=2.20-dev2')
66
@rfm.simple_test
77
class Example10Test(rfm.RunOnlyRegressionTest):
8-
def __init__(self, **kwargs):
9-
super().__init__()
8+
def __init__(self):
109
self.descr = 'Run commands inside a container'
1110
self.valid_systems = ['daint:gpu']
1211
self.valid_prog_environs = ['PrgEnv-cray']

0 commit comments

Comments
 (0)