Re-write test and update docs some more

This commit is contained in:
psakiev 2024-11-12 20:25:18 -07:00
parent 5cbbed42b4
commit 7a79fe88e2
2 changed files with 14 additions and 7 deletions

View File

@ -483,24 +483,31 @@ working in the subshell they can call ``exit`` to leave the build subshell.
.. code-block:: console .. code-block:: console
# create and setup a spack environment for development
# ====
$ spack env activate --temp $ spack env activate --temp
$ spack add zlib-ng $ spack add zlib-ng
$ spack stage -p $SPACK_ENV zlib-ng $ spack stage -p $SPACK_ENV zlib-ng
$ spack develop zlib-ng $ spack develop zlib-ng
# build and make changes
# =====
$ spack install -u autoreconf zlib-ng $ spack install -u autoreconf zlib-ng
# fails # [ fails ]
$ spack dev-dive zlib-ng $ spack dev-dive zlib-ng
# prompt changed, let's check the location is the build directory # prompt changed, confirm the location is the build directory
zlib-ng-build-env $ pwd zlib-ng-build-env $ pwd
/private/var/folders/ln/1_3kxbwd35s_ylsjlm3zmqmc00307v/T/spack-ne8_m488/zlib-ng /private/var/folders/ln/1_3kxbwd35s_ylsjlm3zmqmc00307v/T/spack-ne8_m488/zlib-ng
# confirm build-env in case we forget where we are in subshell hierarchy # confirm build-env in case we forget where we are in subshell hierarchy
zlib-ng-build-env $ spack build-env --status zlib-ng-build-env $ spack build-env --status
==> In build env zlib-ng-wrsaadvkbg7rjj7kfjw5rhdrrfdswcmm ==> In build env zlib-ng-wrsaadvkbg7rjj7kfjw5rhdrrfdswcmm
# fix code # [ fix code ]
zlib-ng-build-env $ make -j6 zlib-ng-build-env $ make -j6
# builds now # [ builds now ]
zlib-ng-build-env $ exit zlib-ng-build-env $ exit
# no longer in the build environment
# exit subshell and rebuild environment
# ====
$ spack build-env --status $ spack build-env --status
==> build environment not detected ==> build environment not detected
$ spack install $ spack install

View File

@ -164,9 +164,9 @@ def test_dev_build_fails_nonexistent_package_name(mock_packages):
assert "Package 'no_such_package' not found" in output assert "Package 'no_such_package' not found" in output
def test_dev_build_fails_no_version(mock_packages): def test_dev_build_msg_no_version(mock_packages):
output = dev_build("dev-build-test-install", fail_on_error=False) output = dev_build("dev-build-test-install", fail_on_error=False)
assert "dev-build spec must have a single, concrete version" in output assert "Defaulting to highest version" in output
def test_dev_build_env(tmpdir, install_mockery, mutable_mock_env_path): def test_dev_build_env(tmpdir, install_mockery, mutable_mock_env_path):