-
Notifications
You must be signed in to change notification settings - Fork 39
Add a spack testing module #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
tldahlgren
wants to merge
7
commits into
main
Choose a base branch
from
add-testing-module
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4aac963
Snapshot of very preliminary work
tldahlgren ca2094f
Add the new module to the index
tldahlgren 2ebd574
Snapshot
tldahlgren 4d83dca
Elaborate on reference URLs
tldahlgren f0565f9
Fix emphasize lines syntax
tldahlgren 403f23b
Fix copyright years
tldahlgren 279c789
Revised introduction
tldahlgren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| $ spack repo remove spack-tests | ||
| ==> Removed repository /home/spack/spack/var/spack/repos/spack-tests with namespace 'spack-tests'. | ||
| $ rm -rf $SPACK_ROOT/var/spack/repos/spack-tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| $ spack repo add $SPACK_ROOT/var/spack/repos/spack-tests/ | ||
| ==> Added repo with namespace 'tutorial'. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| .. Copyright 2013-2021 Lawrence Livermore National Security, LLC and other | ||
| Spack Project Developers. See the top-level COPYRIGHT file for details. | ||
|
|
||
| SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
|
||
| .. include:: common/setup.rst | ||
|
|
||
| .. _testing-tutorial: | ||
|
|
||
| ========================= | ||
| Package Testing Tutorial | ||
| ========================= | ||
|
|
||
| This tutorial walks you through the steps for adding and running Spack | ||
| package tests during and after the software installation process. A package | ||
| that *appears* to install successfully may not actually be installed | ||
| correctly or continue to work indefinitely. There are a number of possible | ||
| reasons. For example, the installation process may not have fully installed | ||
| the software. The installed software may not work. Or the software may | ||
| work right after it is installed but, due to system changes, it stops | ||
| working days, weeks, or months later. So Spack provides features for | ||
| `checking installed software | ||
| <https://spack-tutorial.readthedocs.io/en/latest/tutorial_packaging.html>`_ | ||
|
|
||
| Recall from `Package Creation | ||
| <https://spack-tutorial.readthedocs.io/en/latest/tutorial_packaging.html>`_ | ||
| that Spack packages are installation scripts, or recipes, for building | ||
| software. As such, they are well suited for also encapsulating recipes | ||
| for testing the installed software. | ||
|
|
||
| Tests can be performed at two points in the life of an installed | ||
| package: build-time and stand-alone. **Build-time** tests run as | ||
| part of the package installation process. **Stand-alone** tests run | ||
| at any point after the software is installed. | ||
|
|
||
| --------------- | ||
| Getting started | ||
| --------------- | ||
|
|
||
| In order to avoid modifying your Spack instance with changes from this | ||
| tutorial, let's add a package repository called ``spack-tests``: | ||
|
|
||
| .. literalinclude:: outputs/testing/repo-add.out | ||
| :language: console | ||
|
|
||
| Doing this ensures changes we make here do not adversely affect other | ||
| parts of the tutorial. You can find out more about repositories at | ||
| `Package Repositories <https://spack.readthedocs.io/en/latest/repositories.html>`_. | ||
|
|
||
| ----------- | ||
| Cleaning up | ||
| ----------- | ||
|
|
||
| Before leaving, let's ensure what we have done does not interfere with your | ||
| Spack instance or future sections of the tutorial. Undo the work by entering | ||
| the following commands: | ||
|
|
||
| .. literalinclude:: outputs/testing/cleanup.out | ||
| :language: console | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried/discovered both recently in spack/spack#25300
Currently, for
spack test run /<spec>the spec needs to be loaded to work.