summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2016-12-29unit tests: replace nose with pytest (#2502)Massimiliano Culpo149-17565/+19159
* 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-12-28Allow exclusion of packages from `spack module loads` (#2667)Elizabeth Fischer1-1/+7
* Allow exclusion of packages from `spack module loads` * Comment out excluded packages instead of not showing them at all.
2016-12-28Directive inheritance: laziness for the win (#2623)Massimiliano Culpo7-197/+257
* inheritance of directives: using meta-classes to inject attributes coming from directives into packages + lazy directives * _dep_types -> dependency_types * using a meta-class to inject directives into packages * directives are lazy fixes #2466 * directives.py: allows for multiple inheritance. Added blank lines as suggested by @tgamblin * directives.py: added a test for simple inheritance of directives * Minor improvement requested by @tgamblin CMakePackage: importing names from spack.directives directives: wrap __new__ to respect pep8 * Refactoring requested by @tgamblin directives: removed global variables in favor of class variables. Simplified the interface for directives (they return a callable on a package or a list of them).
2016-12-27Ensure that every file in Spack has a license (#2659)Adam J. Stewart27-143/+550
* Ensure that every package has a license Also fixes URLs with http://http:// doubled. This is a continuation of #2656. * Add license to every file in Spack * Make sure Todd is the author of all packages * Fix flake8 tests * Don't license external Sphinx docs * Don't display licenses in tutorial example packages Also fixes typos and converts command-line examples from tcsh to bash, which is more common
2016-12-25Better tabulation for spack checksum (#2673)Adam J. Stewart1-1/+5
2016-12-25filter_system_path: additionally filter system prefixes (#2672)Denis Davydov2-2/+6
That's because in set_build_environment_variables() the funciton filter_system_paths() is actually applied to package prefixes, and not to prefix/lib or prefix/include.
2016-12-25Add argument to `spack spec` to show deptypes. (#2680)Todd Gamblin2-1/+20
- `-t` | `--types` argument now shows deptypes in `spack spec`
2016-12-25Remove usernames from paths in docs (#2675)Adam J. Stewart9-303/+303
* Remove usernames from paths in docs * Fix path export
2016-12-25Modify github archive regex to support luaposix (#2677)Adam J. Stewart2-1/+6
2016-12-20Revert #2292: use frontend compiler for build deps (#2549)scheibelp4-90/+24
The primary goal of #2292 was to use the frontend compiler to make build dependencies like cmake on HPC platforms. It turns out that while this works in some cases, it did not handle cases where a package was a link dependency of the root and of a build dependency (and could produce incorrect concretizations which would not build).
2016-12-19Support Yorick versions (#2640)Todd Gamblin2-0/+9
2016-12-19Modify github regex to support NCO. (#2633)Todd Gamblin2-1/+10
2016-12-19Fixes for various hash issues (#2626)Todd Gamblin10-59/+84
* Better output for disambiguate_specs() * Fix wrong exception name. * Fix satsifies(): concrete specs require matching by hash. - Fixes uninstall by hash and other places where we need to match a specific spec. - Fix an error in provider_index (satisfies() call was backwards) - Fix an error in satisfies_dependencies(): checks were too shallow. * Fix default args in Spec.tree() * Move installed_dependents() to DB to avoid unknown package error. * Make `spack find` and `sapck.store.db.query()` faster for hashes. * Add a test to ensure satisfies() respects concrete Specs' hashes.
2016-12-18Added customization for make targets in 'build' and 'install' phases for ↵Alfredo Adolfo Gimenez1-4/+10
AutotoolsPackage (#2464) * Customization for make targets in build and test phases for AutotoolsPackage * Updated Blitz++ to use customized make build and test targets * Removed flake8 error * Removed make test customization, added make install customization, need to figure out issues with multiple make targets * Changed build_targets and install_targets to normal attributes
2016-12-15openblas: derives from MakefilePackage (#2488)Massimiliano Culpo1-13/+7
* MakefilePackage: changed build_args and install_args for consistency with #2464 openblas: derives from MakefilePackage * MakefilePackage: changed default edit behavior
2016-12-14Fix target for compiler on CNL operating systems (#2580)Mario Melara2-2/+2
Changes any to a string to avoid <built-in function any> being incorrectly added to target in compilers.yaml.
2016-12-14Make unzip quiet (#2593)Adam J. Stewart2-1/+2
2016-12-13Change attribute to match ArchSpec refactor (#2579)Mario Melara1-1/+1
Fixes issue #2578
2016-12-13Better cxx11/14/17 flags for GNU/Clang/Intel (#2539)Ben Morgan4-2/+67
* Better cxx11/14 flags for GNU/Clang/Intel - GCC 4.8 only supports -std=c++1y for C++14 - Use CMake's rules for AppleClang to set cxx11 and cxx14 flags based on Apple Xcode/LLVM version - Use CMake's rules for Intel to add support for cxx14 flags based on Intel version. * Add cxx17_flag property Implement property in compiler for c++17 as per those for c++11/14. Add concrete support for GNU/Clang: - Return -std=c++1z for GCC 5 and above per GCC documentation - Return -std=c++1z for Clang 3.5 and above per Clang documentation - Return -std=c++1z for Apple LLVM 6.1 and above per CMake's rules
2016-12-13Update `spack setup` and `spack graph` to be consistent with recent ↵Elizabeth Fischer2-2/+4
refactoring (#2317) * Update `spack setup` and `spack graph` to be consistent with c557e765 and 9347f869. Fixes #2316. * Added another "fix" necessary to make `spack setup` work. * Added another "fix" necessary to make `spack setup` work. (reverted from commit 7f0d3ecb38c97ec00491d7cd66b4266e3018b1ca)
2016-12-13Add a test to ensure package names have the right case. (#2562)Todd Gamblin3-3/+107
2016-12-12Add missing bzip2 dependency to freetype (#2536)Adam J. Stewart1-2/+2
* Add freetype dependency on bzip2 * Switch package with an install method for the docs
2016-12-12Set parent process's input stream inside the build process. (#2535)Sergey Kosukhin1-0/+13
2016-12-12Add documentation for repositories and namespaces. (#2474)Todd Gamblin8-17/+476
* Add documentation for repositories and namespaces. * Update and extend repository documentation per review. - Also add `-N` argument for `spack spec`
2016-12-11[docs] missin .. code-block:: console in Spack 101 (#2530)Stephen McDowell1-0/+2
The advanced [Uninstalling Packages](spack.readthedocs.io/en/latest/tutorial_sc16_spack_basics.html#uninstalling-packages) via hash has a couple missing `.. code-block:: console` directives ;) I have no idea what branch to direct this to though...
2016-12-10clang: do xcode mockup iff requested by a package (#2544)Denis Davydov4-5/+13
* clang: do xcode mockup iff requested by a package * add a note * add pkg to setup_custom_environment() and decide whether or not to use mockup XCode there based on the package
2016-12-08Make targets an attribute of compilers (#2500)becker336-25/+56
* Make targets an attribute of compilers, similar to OS. Allows users to use `spack compiler find` to add compilers for the same platform/os but different targets when spack is installed on a file system mounted on machines with different targets. * Changed get_compilers() method to treat old compilers with no target as target='any' * flake8 changes * Address change requests for comments/code clarity
2016-12-08Json loader now returns str objects instead of unicode. (#2524)Sergey Kosukhin1-2/+22
2016-12-08Revert to-string for CNL operating system (#2526)scheibelp2-3/+3
2016-12-08Add support for parsing R-XML URL versions. (#2525)Todd Gamblin3-8/+21
* Add support for parsing R-XML URL versions. * Better url-parse debug output. - just print the debug stuff all the time. * fix R-XML versions.
2016-12-08fix for bluegene-q platform (#1980)Pramod Kumbhar2-3/+35
* fix for bluegene-q platform * change powerpc to ppc64 * change CNK to cnk
2016-12-08Fix deptypes for deps specified on command line (#2307)scheibelp2-20/+60
Fixes #2306 Any dependency explicitly mentioned in a spec string ended up with the build and link deptypes unconditionally. This fixes dependency resolution to ensure that packages which are mentioned in the spec string have their deptypes determined by the dependency information in the package.py files. For example if a package has cmake as a build dependency, and cmake is mentioned as a dependency in the spec string for the package, then it ends up with just the build deptype.
2016-12-08Use frontend OS for build/run deps by default (#2292)scheibelp5-25/+91
Packages built targeting a backend may depend on packages like cmake which can be built against the frontend. With this commit, any build dependency or child of a build dependency will target the frontend by default. In compiler concretization when packages copy compilers from nearby packages, build dependencies use compiler information from other build dependencies, and link dependencies avoid using compiler information from build dependencies.
2016-12-07Fixed spelling of variable (#2516)Oliver Breitwieser2-2/+2
2016-12-05Use JSON for the database instead of YAML. (#2189)Todd Gamblin7-82/+282
* Use JSON for the database instead of YAML. - JSON is much faster than YAML *and* can preserve ordered keys. - 170x+ faster than Python YAML when using unordered dicts - 55x faster than Python YAML (both using OrderedDicts) - 8x faster than C YAML (with OrderedDicts) - JSON is built into Python, unlike C YAML, so doesn't add a dependency. - Don't need human readability for the package database. - JSON requires no major changes to the code -- same object model as YAML. - add to_json, from_json methods to spec. * Add tests to ensure JSON and YAML don't need to be ordered in DB. * Write index.json first time it's not found instead of requiring reindex. * flake8 bug.
2016-12-05Allow spack create to handle packages with period in name (#2351)Adam J. Stewart3-10/+13
* Allow spack create to handle packages with period in name * Update tests to handle new package name detection scheme
2016-12-04Bugfix: restore `__contains__` method after ArchSpec refactor. (#2481)Todd Gamblin1-0/+3
2016-12-03Fixes to Handling Multiple Architectures (#2261)Joseph Ciurej13-272/+473
* Added some notes about how multiarch detection could be fixed. * Implemented a preliminary version of the "spack.spec.ArchSpec" class. * Updated the "spack.spec.Spec" class to use "ArchSpec" instead of "Arch". * Fixed a number of small bugs in the "spack.spec.ArchSpec" class. * Fixed the 'Concretizer.concretize_architecture' method so that it uses the new architecture specs. * Updated the package class to properly use arch specs. Removed a number of unused architecture functions. * Fixed up a number of bugs that were causing the regression tests to fail. Added a couple of additional regression tests related to architecture parsing/specification. Fixed a few bugs with setting reserved os/target values on "ArchSpec" objects. Removed a number of unnecessary functions in the "spack.architecture" and "spack.concretize" modules. * Fixed a few bugs with reading architecture information from specs. Updated the tests to use a uniform architecture to improve reliability. Fixed a few minor style issues. * Adapted the compiler component of Spack to use arch specs. * Implemented more test cases for the extended architecture spec features. Improved error detection for multiple arch components in a spec. * Fix for backwards compatibility with v0.8 and prior * Changed os to unknown for compatibility specs * Use `spack09` instead of `spackcompat` for the platform of old specs.
2016-12-01Does nothing if no prexisting config.guess is found. (#2446)Matt Belhorn1-1/+3
* Does nothing if no prexisting config.guess is found. * Update name for RHEL OS.
2016-12-01Update tutorial_sc16_packaging.rst (#2450)TomasPuverle1-1/+1
Fixed a typo.
2016-12-01Update workflows.rst (#2451)TomasPuverle1-1/+1
Fixed a typo.
2016-12-01More informative help messages for spack config. (#2453)Sergey Kosukhin1-2/+10
2016-11-29CDash fixes (#2438)hegner1-4/+4
use short spec instead of spec as CDash has a limitation in name length mark all problems as 'FAILED' as CDash does not understand "ERRORED" status
2016-11-29add headers neede for CDASH to junit output (#2433)hegner1-2/+6
2016-11-24Adding pic_flag property to compilers (#2375)Andrey Prokopenko6-0/+24
Different compilers have different flags for PIC (position-independent code). This patch provides a common ground to accessing it inside specs. See discussions in #508 and #2373. This patch does not address the issue of mixed compilers as mentioned in #508.
2016-11-24Add dynamic search option for package sources (#2270)scheibelp4-8/+70
Package provides a 'list_url' attribute which may be searched to find download links. #1822 created a slowdown for all tests by always searching this URL. This reenables dynamic search only in cases where all other fetchers fail. This also only enables dynamic search when 'mirror_only' is set to false.
2016-11-23Fix indentation for newly created packages (#2391)Adam J. Stewart1-9/+9
2016-11-22Update external distro package to 1.0.1 (#2381)Adam J. Stewart1-60/+92
2016-11-22Forgot http:// in tutorial link.Todd Gamblin1-1/+1
2016-11-22Fix broken doc links.Todd Gamblin6-9/+10