summaryrefslogtreecommitdiff
path: root/share
AgeCommit message (Collapse)AuthorFilesLines
2018-03-29update tests: concretize mpileaks with gcc (#7635)scheibelp1-1/+1
Fixes #7593 By default MacOS concretizes using the clang compiler. The unit tests include a call to "spack spec mpileaks", which has elfutils as a dependency; #7096 added a conflict in elfutils to avoid building with clang, which lead to the MacOS unit tests to start failing. This updates the concretization to force using gcc when concretizing mpileaks.
2018-03-25Various updates to Spack's Bash completion (#7590)Adam J. Stewart1-52/+175
* Various updates to Spack's Bash completion * Equals sign messes up tab completion
2018-03-24Update copyright on LLNL files for 2018. (#7592)Todd Gamblin3-3/+3
2018-03-06Save sources in a mirror and cache it in Travis (#7392)Massimiliano Culpo1-0/+6
2018-02-27Docker-Based Developer Resource (#5871)Omar Padron22-0/+1246
* add docker-based development resources * incorporate feedback from @ax3l * fix docs/improve ssh handling * experiment with custom prompt * add arch/fix missing core_compilers key * add centos/minor tweaks * make prompt experiment optional * workaround problem with latest fedora docker image * add docker documentation page to index toc * try another documentation fix * switch arch linux base to base/archlinux * update the git urls in the Dockerfiles * add opensuse * switch CUSTOM_PROMPT variable to simply "PROMPT"
2018-01-20Restore multiprocessing in unit tests (#6949)Massimiliano Culpo3-9/+1
* Revert "Travis: use --concurrency=multiprocessing only on build tests (#6872)" This reverts commit 596d463714d46929f81db62b171c5a772679bb12. * Removing 'coverage combine' in test script According to what was discovered in #6887, one of the problems is calling 'coverage combine' twice without the '-a' flag. This removes the first call within our test scripts.
2018-01-11Reduce verbosity of build tests (#6901)Adam J. Stewart1-1/+1
2018-01-10Travis: use --concurrency=multiprocessing only on build tests (#6872)Massimiliano Culpo1-1/+5
On a local workstation, it seems that tracking multiple processes during coverage may result in malformed coverage reports for unit tests and not for build tests. Given that multiple processes make a difference in coverage mainly for build tests, try to disable the tracking for unit tests to see if we get more stable coverage results.
2018-01-10Fix bash tab completion for spack install (#6868)Adam J. Stewart1-3/+5
2017-11-15Reduce the calls to the python interpreter during initialization (#6312)Massimiliano Culpo1-3/+10
* Reduce the calls to the python interpreter during initialization This should reduce the delay the users experience when sourcing the setup file to activate shell support. It works by generating at once all the commands that needs to evaluated (they are stored in a string and later `eval`ed by the shell). * setup_env.sh: changed `read` with an equivalent magic For some reason `read` breaks when sourced from a running script. Change the incantation we use to construct the unique python command that will be evaluated. * setup_env.sh: python command now constructed with `printf` for portability This recovers the support for `zsh` that was broken in previous commits.
2017-11-12SC17: reworked module file tutorial section (#5657)Massimiliano Culpo3-0/+69
* Reworked module file tutorial section First draft for the SC17 update. This includes: - adding an introduction on module files + Spack's module generation blueprints - adding a set-up section and provide a docker image for easy set-up - updating all the relevant snippets - extending a bit some of the concepts that were already touched * Added reference to #5582 + committed Dockerfiles Also fixed a couple of typos spotted by Denis. * module file tutorial: added section on template customization * module file tutorial: fixed minor typos + rephrased a sentence * module file tutorial: made explicit that Docker image comes with software * module file tutorial: improved phrasing and layout. Thanks Hartzell! * module file tutorial: added vim and nano to editors * module file tutorial: fixed typo * Fixed typos Thanks Adam! * module file tutorial: updated Dockerfile + minor changes in introduction
2017-11-06add artisanal handcrafted SVG Spack logo. (#6165)Todd Gamblin8-0/+382
- This isn't one of those autogenerated SVGs from a drawing program! - This is a completely re-traced, minimalist SVG file with clearly delineated pieces so that your favorite renderer can draw a Spack logo at whatever resolution you want. - Included versions with text, as well.
2017-11-04Replace github.com/llnl/spack with github.com/spack/spack (#6142)Todd Gamblin3-4/+4
We moved to a new GitHub org! Now make the code and docs reflect that.
2017-09-26Set LANG= for _spack_fn_exists (#5475)Michael Kuhn1-1/+1
type's output can be localized, causing the grep to fail.
2017-09-14Remove echo statements from setup-env.shMatthew Scott Krafczyk1-11/+0
setup-env.sh adds the 'module' command to the user's environment if it is not defined and if there is a Spack installation of environment-modules available. This commit updates that logic to perform these checks and updates quietly.
2017-09-12Shell detection: filter preceding "-"Christoph Junghans1-1/+1
On OSX, the shell detection code may get a preceding dash, like "-bash". This adds a filter to remove it.
2017-09-10Fix two bugs from the bootstrap update (#5312)Matthew Scott Krafczyk1-6/+6
These were discovered with bash 4.1.2. Add quotations around a variable to prevent the destruction of a newline. Without this fix a conditional doesn't work properly. Remove square brackets around a conditional meant to be evaluated based on the return code of a command. This wasn't working properly with an old bash. Fix a typo.
2017-09-08Bootstrap environment-modulesMatthew Scott Krafczyk1-3/+54
Renames the existing bootstrap command to 'clone'. Repurposes 'spack bootstrap' to install packages that are useful to the operation of Spack (for now this is just environment-modules). For bash and ksh users running setup-env.sh, if a Spack-installed instance of environment-modules is detected and environment modules and dotkit are not externally available, Spack will define the 'module' command in the user's shell to use the environment-modules built by Spack.
2017-09-06Update copyright notices for 2017 (#5295)Michael Kuhn3-3/+3
2017-08-28Add --show-full-compiler option to 'spack find'Matthew Scott Krafczyk1-3/+3
When 'spack find' is invoked with the '--show-full-compiler' option, the compiler flags and version are shown for each spec that is found.
2017-08-23Add --source option to spack install (#4102)Christoph Junghans1-1/+1
- -- source will copy source into prefix along with the package. - added a test for --source, as well
2017-08-19Group Travis CI jobs in stages (#5104)Massimiliano Culpo1-0/+13
- This should speed-up Travis CI tests and refers to #5049 - Travis uses build-stages to group tests together - The idea is to let fast tests fail first, then move to longer ones. - Added external perl to avoid download failure from CPAN and reduce build time - Disabling perl-dbi: continues to fail with (504 Gateway Time-out) on Travis - We now cover all the build systems in tests: - Add back `openblas` to Travis as a separate package. - Switched `openblas` for `astyle` to build a simpler MakefilePackage. - Added 'tut' (WafPackage) - Added 'py-setuptools' (PythonPackage) - Added 'perl-dbi' (PerlPackage) - Added 'build_systems' directory to the ones for which we get a summary - Added 'openjpeg' (CMakePackage) - Added 'r-rcpp' (RPackage) - Added comments to build tests to show the covered build system
2017-08-16Add tab completion & update docs for buildcacheAdam J. Stewart1-0/+44
This adds tab completion and fixes some formatting issues in the documentation for the "spack buildcache" command.
2017-08-09Merged 'purge' command with 'clean' and deleted 'purge' (#4970)Massimiliano Culpo1-6/+2
* Merged 'purge' command with 'clean'. Deleted 'purge'. fixes #2942 'spack purge' has been merged with 'spack clean'. Documentation has been updated accordingly. The 'clean' and 'purge' behavior are not mutually exclusive, and they log brief information to tty while they go. * Fixed a wrong reference to spack clean in the docs * Added tests for 'spack clean'. Updated bash completion.
2017-07-31Add --color=[always|never|auto] argument; fix color when piping (#3013)paulhopkins1-1/+2
* Disable spec colorization when redirecting stdout and add command line flag to re-enable * Add command line `--color` flag to control output colorization * Add options to `llnl.util.tty.color` to allow color to be auto/always/never * Add `Spec.cformat()` function to be used when `format()` should have auto-coloring
2017-06-28Return an error exit code if spack cd does not succeed. (#4623)Jon Rood1-0/+2
* Return an error exit code if spack cd does not succeed. * Reducing amount of return statements in spack cd exit code.
2017-06-24Make LICENSE recognizable by GitHub. (#4598)Todd Gamblin3-3/+3
2017-06-07Fix tab completion of Spack subcommands (#4442)Adam J. Stewart1-1/+1
2017-05-17Sphinx no longer supports Python 2.6 (#4266)Adam J. Stewart1-1/+1
* Sphinx no longer supports Python 2.6 * Update vendored sphinxcontrib.programoutput from 0.9.0 to 0.10.0 * Documentation cannot be built in parallel * Let Travis install programoutput for us * Remove vendored sphinxcontrib-programoutput Recent updates to the sphinx package prevent the vendored version from being found in sys.path. We don't vendor sphinx, so it doesn't make sense to vendor sphinxcontrib-programoutput either.
2017-05-10Edits to get setup-env.csh working better (#4044)Matthew Thompson1-3/+9
* Edits to get setup-env.csh working better. Autosets the sys_type a la setup-env.sh * More stealing from bash setup script for module roots * Add error message if SPACK_ROOT isn't set * Remove _sp_lmod_root per Adam J Stewart
2017-05-08rework spack help (#3033)Todd Gamblin1-0/+4
- Full help is now only generated lazily, when needed. - Executing specific commands doesn't require loading all of them. - All commands are only loaded if we need them for help. - There is now short and long help: - short help (spack help) shows only basic spack options - long help (spack help -a) shows all spack options - Both divide help on commands into high-level sections - Commands now specify attributes from which help is auto-generated: - description: used in help to describe the command. - section: help section - level: short or long - Clean up command descriptions - Add a `spack docs` command to open full documentation in the browser. - move `spack doc` command to `spack pydoc` for clarity - Add a `spack --spec` command to show documentation on the spec syntax.
2017-05-03bash completion: fixed invalid identifier (#4079)Massimiliano Culpo1-1/+4
* bash completion: fixed `_spack_create-db-tarball': not a valid identifier * bash completion: dashes are translated to underscores This also fixes the name of the subfunction to be called, as apparently it was not updated after moving the command `create-db-tarball`.
2017-05-01Allow user to specify profile sort column on the command line. (#4056)Todd Gamblin1-0/+3
- Add -P <STAT> argument so that caller can specify a sort column for cProfile. Can specify multiple columns with commas. e.g.: spack -P cumtime,module - Add --lines option to Spack spec to control number of profile lines displayed - Sort by time by default (because it works in all Python versions) - Show sort column options in command help. - Do a short profile run in the unit tests.
2017-04-27Separate integration tests; simplify test scripts (#4006)Todd Gamblin6-174/+161
* Separate build integration tests; simplify test scripts - Move build tests out of the regular Travis unit tests, add more smoke test packages to build. - Run all test scripts with bash -e, which fails on error. - Factor coverage out into a Travis environment variable, so it's more obvious from .travis.yml which tests contribute to coverage and which don't. - Factor dependency checking and much of the front-matter in tests scripts into a setup.sh script, which is sourced by all the test scripts. Extra cruft in each tests script now reduced to 2 lines at the beginning.
2017-04-21Coverage for multiple Python versions. (#3951)Todd Gamblin1-1/+3
Update tests to use codecov for multiple python versions.
2017-04-20Revert "Override partial installs by default" (#3918)Todd Gamblin1-1/+1
* Revert "Override partial installs by default (#3530)" This reverts commit a65c37f15dff4b4d60784fd4fcc55874ce9d6d11.
2017-04-20Revert "Add lmod files to MODULEPATH" (#3917)Todd Gamblin1-2/+0
* Revert "Add lmod files to MODULEPATH (#3912)" This reverts commit 186d1f4511c8aa3bc5ce661b1e883db10e20958a.
2017-04-19Override partial installs by default (#3530)scheibelp1-1/+1
* Package install remove prior unfinished installs Depending on how spack is terminated in the middle of building a package it may leave a partially installed package in the install prefix. Originally Spack treated the package as being installed if the prefix was present, in which case the user would have to manually remove the installation prefix before restarting an install. This commit adds a more thorough check to ensure that a package is actually installed. If the installation prefix is present but Spack determines that the install did not complete, it removes the installation prefix and starts a new install; if the user has enabled --keep-prefix, then Spack reverts to its old behavior. * Added test for partial install handling * Added test for restoring DB * Style fixes * Restoring 2.6 compatibility * Relocated repair logic to separate function * If --keep-prefix is set, package installs will continue an install from an existing prefix if one is present * check metadata consistency when continuing partial install * Added --force option to make spack reinstall a package (and all dependencies) from scratch * Updated bash completion; removed '-f' shorthand for '--force' for install command * dont use multiple write modes for completion file
2017-04-19Add lmod files to MODULEPATH (#3912)Adam J. Stewart1-0/+2
2017-04-03Overhaul Spack's URL parsing (#2972)Adam J. Stewart1-4/+5
* Remove fake URLs from Spack * Ignore long lines for URLs that start with ftp: * Preliminary changes to version regexes * New redesign of version regexes * Allow letters in version-only * Fix detection of versions that end in Final * Rearrange a few regexes and add examples * Add tests for common download repositories * Add test cases for common tarball naming schemes * Finalize version regexes * spack url test -> spack url summary * Clean up comments * Rearrange suffix checks * Use query strings for name detection * Remove no longer necessary url_for_version functions * Strip off extraneous information after package name * Add one more test * Dot in square brackets does not need to be escaped * Move renaming outside of parse_name_offset * Fix versions for a couple more packages * Fix flake8 and doc tests * Correctly parse Python, Lua, and Bio++ package names * Use effective URLs for mfem * Add checksummed version to mitos * Remove url_for_version from STAR-CCM+ package * Revert changes to version numbers with underscores and dashes * Fix name detection for tbb * Correctly parse Ruby gems * Reverted mfem back to shortened URLs. * Updated instructions for better security * Remove preferred=True from newest version * Add tests for new `spack url list` flags * Add tests for strip_name_suffixes * Add unit tests for version separators * Fix bugs related to parseable name but in parseable version * Remove dead code, update docstring * Ignore 'binary' at end of version string * Remove platform from version * Flip libedit version numbers * Re-support weird NCO alpha/beta versions * Rebase and remove one new fake URL * Add / to beginning of regex to avoid picking up similarly named packages * Ignore weird tar versions * Fix bug in url parse --spider when no versions found * Less strict version matching for spack versions * Don't rename Python packages * Be a little more selective, version must begin with a digit * Re-add fake URLs * Fix up several other packages * Ignore more file endings * Add parsing support for Miniconda * Update tab completion * XFAILS are now PASSES for 2 web tests
2017-04-02Set default providers for all virtual dependencies (#3634)Adam J. Stewart1-2/+2
* Set default providers for everything * Add default OpenFOAM provider
2017-03-30support OpenFOAM package(s) (#3528)Mark Olesen1-1/+1
* ENH: add package for building OpenFOAM (1612) from www.openfoam.com - provide 'openfoam' as virtual package. - package as openfoam-com to reflect the distribution point. This initial spack packaging for OpenFOAM supports a number of possible variants and should handle 64-bit labels properly now that the scotch package has been updated accordingly. * ENH: update package for foam-extend (extend-project.de) - provide 'openfoam' as virtual package. - much of the build is now aligned with how the openfoam-com package looks, with the aim of future refactoring. - avoid installing intermediate targets. - contains its own environment sourcing script for the build, for more flexibility and robustness (doesn't touch the python build environ) * ENH: added package for building from openfoam.org - provide 'openfoam' as a virtual package. - this is largely a direct copy of the openfoam-com package. It has been supplied as a courtesy for users and to ensure maximum consistency in quality and naming between the foam-extend, openfoam-com and openfoam-org packages. * CONFIG: add openfoam into bash completion providers list * ENH: have openfoam-com use spack as USERMPI - also simplify the generation of mplib/compiler rules * ENH: have openfoam-org use spack as SYSTEMMPI - this setup requires more environment settings than USERMPI (openfoam-com), but is currently the only means of integration for openfoam-org - simplify generation of mplib/compiler rules * ENH: simplify generation of mplib/compiler rules (foam-extend) - rename mpi rules from SPACK,SPACKMPI to USER,USERMPI for consistency with openfoam-com and to generalize for any build system. * STYLE: record spack tree as a log file (openfoam) - can be useful for future diagnostics and general record keeping
2017-02-20Fix tab completion of directories and filenames (#3184)Adam J. Stewart1-35/+11
2017-02-18Fix tab completion after change to uninstall flag (#3175)Adam J. Stewart1-1/+1
2017-02-06Bash Programmable Completion for Spack (#3026)Adam J. Stewart2-0/+939
2017-01-23Export spack function so it works in subshells (#2908)Michael Kuhn1-0/+5
2017-01-01tests: `coverage combine` run only if tests succeeded (#2712)Massimiliano Culpo1-2/+1
2016-12-30Run coverage for the `spack install` command as well as `spack test`.Todd Gamblin1-1/+2
- Also don't run coverage on OSX.
2016-12-29unit tests: replace nose with pytest (#2502)Massimiliano Culpo2-32/+6
* Porting: substitute nose with ytest This huge commit substitutes nose with pytest as a testing system. Things done here: * deleted external/nose as it is no longer used * moved mock resources in their own directory 'test/mock/' * ported two tests (cmd/find, build_system) to pytest native syntax as an example * build_environment, log: used monkeypatch instead of try/catch * moved global mocking of fetch_cache to an auto-used fixture * moved global mocking from test/__init__.py to conftest.py * made `spack test` a wrapper around pytest * run-unit-tests: avoid running python 2.6 tests under coverage to speed them up * use `pytest --cov` instead of coverage run to cut down testing time * mock/packages_test: moved mock yaml configuration to files instead of leaving it in the code as string literals * concretize.py: ported tests to native pytest, reverted multiprocessing in pytest.ini as it was creating the wrong report for coveralls * conftest.py, fixtures: added docstrings * concretize_preferences.py: uses fixtures instead of subclassing MockPackagesTest * directory_layout.py: uses fixtures instead of subclassing MockPackagesTest * install.py: uses fixtures instead of subclassing MockPackagesTest * optional_deps.py: uses fixtures instead of subclassing MockPackagesTest optional_deps.py: uses fixtures instead of subclassing MockPackagesTest * packages.py: uses fixtures instead of subclassing MockPackagesTest * provider_index.py: uses fixtures instead of subclassing MockPackagesTest * spec_yaml.py: uses fixtures instead of subclassing MockPackagesTest * multimethod.py: uses fixtures instead of subclassing MockPackagesTest * install.py: now uses mock_archive_url * git_fetch.py: uses fixtures instead of subclassing MockPackagesTest * hg_fetch.py: uses fixtures instead of subclassing MockPackagesTest * svn_fetch.py, mirror.py: uses fixtures instead of subclassing MockPackagesTest repo.py: deleted * test_compiler_cmd.py: uses fixtures instead of subclassing MockPackagesTest * cmd/module.py, cmd/uninstall.py: uses fixtures instead of subclassing MockDatabase * database.py: uses fixtures instead of subclassing MockDatabase, removed mock/database * pytest: uncluttering fixture implementations * database: changing the scope to 'module' * config.py: uses fixtures instead of subclassing MockPackagesTest * spec_dag.py, spec_semantics.py: uses fixtures instead of subclassing MockPackagesTest * stage.py: uses fixtures instead of subclassing MockPackagesTest. Removed mock directory * pytest: added docstrings to all the fixtures * pytest: final cleanup * build_system_guess.py: fixed naming and docstrings as suggested by @scheibelp * spec_syntax.py: added expected failure on parsing multiple specs closes #1976 * Add pytest and pytest-cov to Spack externals. * Make `spack flake8` ignore externals. * run-unit-tests runs spack test and not pytest. * Remove all the special stuff for `spack test` - Remove `conftest.py` magic and all the special case stuff in `bin/spack` - Spack commands can optionally take unknown arguments, if they want to handle them. - `spack test` is now a command like the others. - `spack test` now just delegates its arguments to `pytest`, but it does it by receiving unknown arguments and NOT taking an explicit help argument. * Fix error in fixtures. * Improve `spack test` command a bit. - Now supports an approximation of the old simple interface - Also supports full pytest options if you want them. * Use external coverage instead of pytest-cov * Make coverage use parallel-mode. * change __init__.py docs to include pytest
2016-11-29Allow shell support to work when set -u is set (#2418)Adam J. Stewart1-1/+1