Skip to content

Commit f5ec3e6

Browse files
update documentation for spack load example
remove the output from the `buildtest inspect query` command when showing results for the spack load example
1 parent 4ec2d19 commit f5ec3e6

File tree

3 files changed

+11
-28
lines changed

3 files changed

+11
-28
lines changed

buildtest/tools/docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def build_spack_examples(autogen_dir):
8787
f"{inspect_dir}/remove_environment_example.txt": "buildtest inspect query --testpath remove_environment_automatically remove_environment_explicit",
8888
f"{inspect_dir}/pre_post_cmds.txt": "buildtest inspect query -o --testpath run_pre_post_commands",
8989
f"{inspect_dir}/mirror_example.txt": "buildtest inspect query -o --testpath add_mirror add_mirror_in_spack_env",
90-
f"{inspect_dir}/spack_load.txt": "buildtest inspect query -o --testpath spack_load_example",
90+
f"{inspect_dir}/spack_load.txt": "buildtest inspect query -t spack_load_example",
9191
f"{inspect_dir}/spack_test.txt": "buildtest inspect query -o --testpath spack_test_m4",
9292
f"{inspect_dir}/spack_test_specs.txt": "buildtest inspect query -o --testpath spack_test_results_specs_format",
9393
f"{inspect_dir}/spack_sbatch.txt": "buildtest inspect query --testpath spack_sbatch_example",

docs/buildspecs/spack.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,13 @@ for buildtest to install spack in the environment.
373373
Loading Specs
374374
---------------
375375

376-
We can load specs using ``spack load`` which can be used for running tests or simply loading the package once it is installed,
377-
Let's say if we were to test ``m4``, we can load the package prior to testing it. The ``load`` refers to ``spack load`` and ``options`` refers to options
378-
that can be passed to ``spack load`` command with a list of specs defined by ``specs`` property. The below command would translate to
379-
``spack load --only package m4``
376+
We can load specs into our user environment via ``spack load`` which can be used for running tests or
377+
simply loading the package once it is installed. In this next example, we will test ``m4`` package,
378+
where we load the package first prior to testing it. The ``load`` refers to ``spack load`` and ``options``
379+
refers to command options passed to ``spack load`` command with a list of specs to load defined
380+
by ``specs`` property.
381+
382+
In this test, the command would translate to ``spack load --only package m4``
380383

381384
.. literalinclude:: ../../examples/spack/spack_load.yml
382385
:language: yaml
@@ -388,6 +391,7 @@ Let's build this by running the following
388391

389392
.. program-output:: cat buildtest_tutorial_examples/spack/build/spack_load.txt
390393

391-
.. dropdown:: ``buildtest inspect query -o --testpath spack_load_example``
394+
Let's take a look at the generated test, take note of the `spack load` command
395+
.. dropdown:: ``buildtest inspect query -t spack_load_example``
392396

393397
.. program-output:: cat buildtest_tutorial_examples/spack/inspect/spack_load.txt

docs/buildtest_tutorial_examples/spack/inspect/spack_load.txt

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$ buildtest inspect query -o --testpath spack_load_example
1+
$ buildtest inspect query -t spack_load_example
22
───────────────────────────────────────────────────────── spack_load_example/60d45649-5ee2-4efd-978b-58b7bafbc10d ──────────────────────────────────────────────────────────
33
Executor: generic.local.bash
44
Description: Run spack load for m4 package and run tests
@@ -13,27 +13,6 @@ Build Script: /home/spack/runs/generic.local.bash/spack_load/spack_load_example/
1313
Output File: /home/spack/runs/generic.local.bash/spack_load/spack_load_example/60d45649/spack_load_example.out
1414
Error File: /home/spack/runs/generic.local.bash/spack_load/spack_load_example/60d45649/spack_load_example.err
1515
Log File: /home/spack/buildtest/var/logs/buildtest_hhrqf19o.log
16-
────────────────────────────── Output File: /home/spack/runs/generic.local.bash/spack_load/spack_load_example/60d45649/spack_load_example.out ──────────────────────────────
17-
==> Spack test 47fcdc7a-1994-4013-98c2-eba6d48e7103
18-
==> Testing package m4-1.4.18-mkc3u4x
19-
==> Results for test suite '47fcdc7a-1994-4013-98c2-eba6d48e7103':
20-
==> m4-1.4.18-mkc3u4x PASSED
21-
==> Testing package m4-1.4.18-mkc3u4x
22-
==> [2023-08-08-18:10:45.271339] test: ensuring m4 version is 1.4.18
23-
==> [2023-08-08-18:10:45.272816] '/home/spack/spack-workspace/software/linux-ubuntu18.04-x86_64/gcc-7.5.0/m4-1.4.18-mkc3u4x2p2wie6jfhuku7g5rkovcrxps/bin/m4' '--version'
24-
m4 (GNU M4) 1.4.18
25-
Copyright (C) 2016 Free Software Foundation, Inc.
26-
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
27-
This is free software: you are free to change and redistribute it.
28-
There is NO WARRANTY, to the extent permitted by law.
29-
Written by Rene' Seindal.
30-
PASSED
31-
==> [2023-08-08-18:10:45.282548] test: ensuring m4 example succeeds
32-
==> [2023-08-08-18:10:45.282862] '/home/spack/spack-workspace/software/linux-ubuntu18.04-x86_64/gcc-7.5.0/m4-1.4.18-mkc3u4x2p2wie6jfhuku7g5rkovcrxps/bin/m4' '/home/spack/.s
33-
// macro is defined
34-
Hello, World!
35-
PASSED
36-
3716
─────────────────────────────── Test File: /home/spack/runs/generic.local.bash/spack_load/spack_load_example/60d45649/spack_load_example.sh ────────────────────────────────
3817
#!/bin/bash
3918
source /home/spack/spack/share/spack/setup-env.sh

0 commit comments

Comments
 (0)