You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorial_build_automation.rst
+15-29Lines changed: 15 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,52 +110,36 @@ Here is the test's code:
110
110
111
111
When :attr:`~reframe.core.pipeline.RegressionTest.build_system` is set to ``'Spack'``, ReFrame will leverage Spack environments in order to build the test code.
112
112
If the environment is not specified by the user, ReFrame will automatically create one inside the stage directory.
113
-
ReFrame treats Spack environments specified by the user as *test resources* so it expects to find them under the test's :attr:`~reframe.core.pipeline.RegressionTest.sourcesdir`, which defaults to ``'src'``.
114
-
Here is the directory structure for the test in this particular example that we show here:
115
-
116
-
.. code:: console
117
-
118
-
tutorials/build_systems/spack/
119
-
├── spack_test.py
120
-
└── src
121
-
└── myenv
122
-
└── spack.yaml
123
-
124
-
125
-
We could have placed ``spack.yaml`` directly under the ``src/`` directory, in which case we would need to specify ``'.'`` as an environment.
126
-
For reference, here are the contents of ``spack.yaml``:
That's the case in this example, where the software to be built is specified through the attribute :attr:`~reframe.core.buildsystems.Spack.specs`
129
114
115
+
When Spack environments are specified by the user, ReFrame treats them as *test resources* so it expects to find them under the test's :attr:`~reframe.core.pipeline.RegressionTest.sourcesdir`, which defaults to ``'src'``.
130
116
131
117
As with every other test, ReFrame will copy the test's resources to its stage directory before building it.
132
-
ReFrame will then activate the environment and install the associated specs as in this case.
133
-
Optionally, we can add more specs to the environment by setting the :attr:`~reframe.core.buildsystems.Spack.specs` attribute of the build system.
118
+
ReFrame will then activate the generated environment, add the given specs using the ``spack add`` command and install them.
134
119
Here is what ReFrame generates as a build script in this example:
Any additional specs specified inside the ReFrame test will be added using the ``spack add`` command.
143
130
As you might have noticed ReFrame expects that Spack is already installed on the system.
144
131
The packages specified in the environment and the tests will be installed in the test's stage directory, where the environment is copied before building.
145
132
Here is the stage directory structure:
146
133
147
134
.. code:: console
148
135
149
136
stage/generic/default/builtin/BZip2SpackCheck/
150
-
├── myenv
137
+
├── rfm_spack_env
151
138
│ ├── spack
152
-
│ │ ├── opt
153
-
│ │ │ └── spack
154
-
│ │ │ ├── bin
155
-
│ │ │ └── darwin-catalina-skylake
156
-
│ │ └── share
157
-
│ │ └── spack
158
-
│ │ └── modules
139
+
│ │ └── opt
140
+
│ │ └── spack
141
+
│ │ ├── bin
142
+
│ │ └── darwin-catalina-skylake
159
143
│ ├── spack.lock
160
144
│ └── spack.yaml
161
145
├── rfm_BZip2SpackCheck_build.err
@@ -172,7 +156,9 @@ Finally, here is the generated run script that ReFrame uses to run the test, onc
0 commit comments