Commit graph

46 commits

Author SHA1 Message Date
Massimiliano Culpo
6ba1c82858 tests: Add python 3.7 to Travis CI (#8778)
* Test Spack on Python 3.7 as part of Travis CI
* Currently using xenial to pull-in python 3.7
    * As xenial is not officially supported yet, Travis tolerates failures on it.
2018-07-23 23:07:36 -07:00
Todd Gamblin
305c95b69f tests: move doc tests to the unit test stage
- Frequently, the documentation build will fail mysteriously in some
  spack command.

- The cause is some new bug introduced by the PR, but this is not
  apparent because the unit tests haven't run and the doc tests aren't
  targeted at code bugs.

- Users end up puzzled by doc failures when they're really code failures.

- Move the doc tests parallel with the code tests, so that we can more
  easily see bugs like this.
2018-07-23 07:27:48 -07:00
Scott Wittenburg
1713cb37da style: Add pep8-naming plugin to flake8
Enforce PEP8 naming conventions for things like variables, methods,
classes, etc.

See the table here:

https://pypi.org/project/pep8-naming/

...for error codes emitted, in case some should be added as
exceptions in the flake8 configuration files.
2018-07-19 00:41:36 -07:00
Massimiliano Culpo
94c22092a8
Save sources in a mirror and cache it in Travis (#7392) 2018-03-06 06:49:43 +01:00
Massimiliano Culpo
ef270615f0
Use python3.6 to test building docs (#7218)
I think the main issue here is that we ship a custom version of a system
library (`argparse`), and this is prone to fail if `argparse` is
imported before we hack `sys.path` internally.

Probably a better solution would be not to customize argparse, but
instead have a wrapper on top of whatever the system provides.
2018-02-12 12:18:51 +01:00
Massimiliano Culpo
de679abd67
Added flags to unit tests + OSX build done once per day (#6988)
* Adding flags to codecov reports

* OSX builds are triggered once a day
2018-01-18 20:06:26 +01:00
Massimiliano Culpo
a4c4739626 Travis: upload the coverage data as part of the script (#6877)
According to Travis docs the exit code of after_success doesn't affect
the build result. Instead, uploading the coverage data as the last step
of the script will cause the job to fail if the command exits with
non-zero.

https://docs.travis-ci.com/user/customizing-the-build/#Breaking-the-Build
2018-01-10 20:41:19 -06:00
Massimiliano Culpo
aa24858648 travis: removed /usr/local/include/c++ before installing gcc on OSX (#6515)
"brew install gcc" fails for travis build because of an existing
/usr/local/include/c++. This commit removes the offending file
as suggested by brew.
2017-11-29 11:33:00 -08:00
Massimiliano Culpo
99fb394ac1 Group Travis CI jobs in stages (#5104)
- 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-19 14:52:27 -07:00
Massimiliano Culpo
489dde1135 travis: fixes failure on six (#4415) 2017-06-01 14:42:33 +02:00
Ben Boeckel
f38d250e50 gpg: add 'spack gpg subcommand (#3845)
- Add a `spack gpg` subcommand in anticipation of signed binaries.
- GPG keys are stored in var/spack/gpg, and the spack gpg command manages them.
- Docs are included on the command.
2017-05-26 10:31:04 -07:00
Todd Gamblin
32c570913d Move doc dependencies to requirements.txt for readthedocs (#4280)
* Move doc dependencies to requirements.txt for readthedocs

* Move sphinx to doc requirements.
2017-05-17 20:45:03 -05:00
Adam J. Stewart
cafc3cc3ca Sphinx no longer supports Python 2.6 (#4266)
* 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-17 11:36:02 -05:00
Adam J. Stewart
e8f493ee7b Travis version of pip is too old (#4180)
* Travis version of pip is too old

* Also need to upgrade setuptools
2017-05-09 13:59:59 -05:00
Todd Gamblin
bb5a433a46 Separate integration tests; simplify test scripts (#4006)
* 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-27 11:47:56 -07:00
Todd Gamblin
4572685710 Coverage for multiple Python versions. (#3951)
Update tests to use codecov for multiple python versions.
2017-04-21 17:41:30 -07:00
Todd Gamblin
3f21f2b088 Clean up tests and add Python3 to Travis.
- Clean up spec_syntax tests: don't dependend on DB order.
- spec_syntax hash parsing tests were strongly dependent on the order the
  DB was traversed.
- Tests now specifically grab the specs they want from the mock DB.
- Tests are more readable as a result.

- Add Python3 versions to Travis tests.
2017-03-31 13:40:41 -07:00
Todd Gamblin
0331b08c64 Update externals to work with Python 3
- Update YAML version to support Python 3
- Python 3 support for ordereddict backport
- Exclude Python3 YAML from version tests.
- Vendor six into Spack.
- Make Python version-check tests work with Python 3
- Add ability to add version check exceptions with '# nopyqver' line
  comments.
2017-03-31 13:40:41 -07:00
Massimiliano Culpo
e34acd0074 qa: allow fast finish to avoid consuming a precious OSX build on a PR that will fail (#3120) 2017-02-10 18:21:52 -08:00
Todd Gamblin
a5700a8888 Use codecov for coverage instead of coveralls (#2933)
* Switch from coveralls to codecov

- Add .codecov.yml, simplify .travis.yml
- Add codecov badge to README.md

* Add tests for spack graph.
2017-01-26 02:19:35 -08:00
Todd Gamblin
1bd13827c9 Add release branches to travis testing. 2017-01-16 20:01:07 -08:00
Todd Gamblin
b5537553f2 Run coverage for the spack install command as well as spack test.
- Also don't run coverage on OSX.
2016-12-30 17:18:19 -08:00
Todd Gamblin
d52c44cba9 Add OSX build to .travis.yml. Clean up .travis.yml (#2689)
* Add OSX build to .travis.yml.  Clean up .travis.yml
* Add gcc/gfortran to the mac brew setup.
2016-12-30 13:59:21 -08:00
Massimiliano Culpo
7ea10e768e unit tests: replace nose with pytest (#2502)
* 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-29 07:48:48 -08:00
Todd Gamblin
089e5b5996 Remove CYAML tests from Spack now that the DB is JSON. (#2487) 2016-12-05 10:31:49 -08:00
Massimiliano Culpo
2634e4909f travis: sphinx does not support python 2.6 anymore (#2485) 2016-12-05 08:27:03 -08:00
Todd Gamblin
db89b534bd travis.yml: Only build master and develop on push 2016-10-30 23:55:00 -07:00
Massimiliano Culpo
9726574846 travis : unit tests will run with and without libyaml (#2024)
* travis : unit tests will run with and without libyaml

* travis : fixed package that are installed
2016-10-15 14:21:50 -07:00
Todd Gamblin
c470ffe1ac Install graphviz before build. 2016-08-30 20:17:12 -07:00
Adam J. Stewart
a235d030ac Fix typos and bugs in Travis config file
Forgot to change one of the TEST_TYPEs to TEST_SUITE.
-eq not working, trying == instead.
Cache doesn't seem to be working, removed.
2016-08-30 15:21:15 -05:00
Adam J. Stewart
732c1985ef Overhaul Spack's CI Infrastructure 2016-08-30 15:20:03 -05:00
alalazo
f4422dc165 qa : fixes #1370 (no flake8 on python 2.6, coveralls only python 2.7) 2016-07-30 18:49:23 +02:00
Todd Gamblin
f158375054 .travis.yml uses a script now.
- user can run the same script.
2016-05-11 01:17:52 -07:00
Todd Gamblin
2aa4387eba Update code style checking.
- Exempt overlong URL lines from checks.
- Omit some of the more painful PEP items.
2016-05-11 00:07:42 -07:00
alalazo
3f20014f33 qa : differentiate framework from packages 2016-05-10 18:45:11 +02:00
alalazo
190c437980 qa : copied flake8 configuration, updated travis.yml 2016-05-10 18:38:30 +02:00
Todd Gamblin
e60f25f209 Move args to .coveragerc 2016-05-10 00:51:08 -07:00
alalazo
1664d1b503 travis : removed external directory from the list under coverage 2016-03-22 15:59:58 +01:00
alalazo
6e847b7d76 Merge branch 'develop' of https://github.com/LLNL/spack into qa/coding_standard
Conflicts:
	.travis.yml
2016-03-22 15:57:35 +01:00
Todd Gamblin
d8a402ae5b Add compiler info and a simple libdwarf build to the checks. 2016-03-15 14:33:10 -07:00
alalazo
4b22c2406c removed redundant references to pep8 2016-02-05 08:56:20 +01:00
alalazo
00185a39d9 reverted email notification 2016-01-19 19:28:38 +01:00
alalazo
ae7c999712 code checking : added flake8 2016-01-19 18:55:18 +01:00
alalazo
f3d62f1d3b code checking : added pep8 and coveralls 2016-01-19 18:29:39 +01:00
Todd Gamblin
55237b094a Use new travis insfrastructure (sudo:false) 2015-11-29 22:09:11 -08:00
Todd Gamblin
45ffcdee7b Add very basic Travis CI support. 2015-11-29 22:02:13 -08:00