Commit graph

65 commits

Author SHA1 Message Date
Todd Gamblin
365387e929 stopgap: allow travis to fail for Python 2.6 again
- Travis still fails on `spack spec` in Python 2.6.
- Allow the failure until we get to the bottom of it.
2018-12-30 00:19:08 -08:00
Todd Gamblin
19b7b15929 coverage: use kcov to get coverage for our cc script 2018-12-29 23:47:29 -08:00
Todd Gamblin
c92ac70c72
bugfix: add codecov upload back to travis.yml (#10220)
Codecov upload was accidentally removed in #9805
2018-12-29 12:09:42 -08:00
Todd Gamblin
d65c6ba9b2 Use homebrew addon instead of manually invoking brew (#10213) 2018-12-29 06:12:02 +01:00
Omar Padron
fcce8b8dc2 travis: fix pip install for docker stage (#10177) 2018-12-23 17:42:09 -08:00
Omar Padron
60298787e4 Fix docker builds (#9805)
* move docker test logic to share/spack/qa
* update Dockerfile for archlinux
2018-12-20 11:17:46 -08:00
Massimiliano Culpo
61239257f9
Store ccache directory explicitly in Travis. (#10119)
* Store ccache directory explicitly in Travis.

Despite we started using ccache on `develop`, it seems the cache itself
is not stored from one CI build to the next. This might be du to the
fact that our language on Travis is Python and not C nor C++.

Hence here we store the ccache directory explicitly.
2018-12-15 17:53:51 +01:00
Christoph Junghans
71a86bb840 .travis.yml: enable ccache (#6370) 2018-12-15 10:52:31 +01:00
Massimiliano Culpo
020a01b18f Updated the Travis environment to xenial (#10090)
* Updated the Travis environment to xenial.
* Python 2.6 needs to remain on Trusty (can't be installed from Xenial)
2018-12-14 08:43:58 -08:00
Todd Gamblin
88a3393462
travis: allow Python 2.6 to fail until we figure out why Travis hangs (#9776) 2018-11-09 09:29:13 -08:00
Todd Gamblin
daab8d9109
docker: allow docker build to fail until it's fixed (#9658) 2018-10-26 21:50:28 -07:00
Omar Padron
aa1c814c75 docker: unite Dockerfiles; auto-deploy images to DockerHub (#9329)
* Unite Dockerfiles - add build/run/push scripts
* update docker documentation
* update .travis.yml
* switch to using a preprocessor on Dockerfiles
* skip building docker images on pull requests
* update files with copyright info
* tweak when travis builds for docker files are done
2018-10-26 10:15:05 -07:00
Todd Gamblin
5aa05b8ef4
travis: require sudo in an attempt to avoid build timeouts (#9327)
- Many container builds are timing out frequently during Spack tests in
  Travis CI.

- Travis recommends to try `sudo: required` to see whether this is an
  infrastructure issue or something else.

- added `sudo: required` to all Linux builds.

- added --verbose to `spack test` invocation so that we can see more
  easily what tests it's timing out on.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2018-09-24 14:55:36 -07:00
Todd Gamblin
940e35059e travis: bring back macOS test in unit test stage 2018-09-03 07:27:21 -07:00
Todd Gamblin
03542f2a07 travis: clean up .travis-ci.yml wrapping and indentation
- fix line wrapping in travis.yml to make parts more legible
- Travis can handle multi-line if statements if you use semicolos.
2018-09-03 07:27:21 -07:00
Todd Gamblin
e58c6e1b73 travis: fix macOS builds, avoid brew autoupdate 2018-09-03 07:27:21 -07:00
Todd Gamblin
82820efe37 Remove Python 3.3 from testing.
- Support for Python 3.3 isn't really needed, as nothing uses it as the
  default system Python, and nearly everyone will have a newer Python 3
  version installed.
2018-08-24 16:22:37 -07:00
Adam J. Stewart
2e8a820afd Even better Makefile target parsing (#8819)
#8223 replaced regex-based makefile target parsing with an invocation of
"make -q". #8818 discovered that "make -q" can result in an error for some
packages.

Also, the "make -q" strategy relied on interpreting the error code, which only
worked for GNU Make and not BSD Make (which was deemed acceptable at
the time). As an added bonus, this implementation ignores the exit code and
instead parses STDERR for any indications that the target does not exist; this
works for both GNU Make and BSD Make.

#8223 also updated ninja target detection to use "ninja -t targets". This does
not change that behavior but makes it more-explicit with "ninja -t targets all"

This also adds tests for detection of "make" and "ninja" targets.
2018-08-20 17:42:28 -04:00
Adam J. Stewart
7e0bd152b7 Generate coverage reports for all unit and build tests 2018-08-04 21:18:49 -07:00
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