Commit graph

621 commits

Author SHA1 Message Date
Todd Gamblin
cf3d236b9f Merge branch 'scheibelp-features/externaldeps' into develop 2015-11-23 17:50:49 -08:00
Todd Gamblin
1447fd0a12 Merge pull request #160 from SteVwonder/stevwonder/develop
Fixed -l flag for 'spack extensions'
2015-11-23 15:50:18 -08:00
Tom Scogland
5e93dd6592 modified warning to reference spack clean
clean --dist has been removed, command fixed to something that works.
2015-11-20 11:49:46 -08:00
Stephen Herbein
9c30e0210b Fixed -l flag for 'spack extensions' 2015-11-12 08:15:38 -08:00
Peter Scheibel
6d7b26d4e0 Insert lib/spack/external into sys.path. This avoids cases where the system
python install and lib/spack/external have the same library installed. This
requires modifying the names of some modules in lib/spack/external in cases
where both the system python and backported features of future python versions
(i.e. after 2.6) are used (previously distinguished by "from external import X"
and "import X").
2015-11-11 18:04:22 -08:00
Todd Gamblin
0d993947ee Fix SPACK-93, SPACK-94, GitHub #150
- `remove_prefix` was modified to remove from the DB, but the package
  may not have been added to the DB yet when `remove_prefix` is called
  from `cleanup`.

- Made `remove_prefix` a pure utility function (it just removes the prefix)

- Added `installed_db.remove()` call only after the `remove_prefix` in
  `uninstall`.
2015-11-04 16:44:33 -08:00
Todd Gamblin
339da1da3d Make architecture reflect OS *and* machine. Use Python's platform module. 2015-11-04 07:46:17 -08:00
Massimiliano Culpo
6db2a58008 Fixed typo : write_lock() -> write_transaction() 2015-10-30 07:42:58 +01:00
Todd Gamblin
a1c42c2753 Merge Greg Becker's build database support into develop. 2015-10-29 02:22:20 -07:00
Todd Gamblin
671faa4b99 Merge pull request #124 from scheibelp/features/testinstall-cmd
Features/testinstall cmd
2015-10-29 00:16:52 -07:00
Todd Gamblin
ed0c80e1cb Merge pull request #145 from markcmiller86/v-char-bugfix
generalize one of the cases to handle many more kinds of formatting o…
2015-10-29 00:02:01 -07:00
Todd Gamblin
fec6674597 Merge pull request #139 from mathstuf/use-uname-for-arch
architecture: use uname if available
2015-10-29 00:01:30 -07:00
miller86
21e9d5c5c3 generalize one of the cases to handle many more kinds of formatting options 2015-10-27 17:05:27 -07:00
Todd Gamblin
a58ae0c5d0 Build database working with simple transaction support; all tests passing. 2015-10-27 16:36:44 -07:00
Todd Gamblin
bf8479bec6 Fix stupid lock bug.
- Code simplification ignored case where exception was raised.
- If LockError was raised, read and write counts were incremented erroneously.
- updated lock test.
2015-10-27 16:34:26 -07:00
Peter Scheibel
50d0a2643b Not all package stages have an archive file (e.g. source code repos) but all of
them do have a source_path: use this instead to check whether the package
resources were successfully retrieved.
2015-10-27 13:34:46 -07:00
Todd Gamblin
af7b96c14a Lock acquires return True/False depending on whether they got POSIX lock. 2015-10-27 00:35:06 -07:00
Ben Boeckel
6c9b10f73d architecture: remove custom mac_type method 2015-10-26 18:55:10 -04:00
Ben Boeckel
17a58ee0a9 architecture: use uname if available 2015-10-26 18:54:04 -04:00
Peter Scheibel
3b554c709b Fetch errors were also terminating runs of test-install with system exit, so
stage.fetch() was updated to raise a FetchError instead of calling tty.die().
Output is the same for spack install in case of a fetch error.
2015-10-26 15:26:08 -07:00
Ben Boeckel
9d90cb6962 python: use the setdefault method on dict
It allows more concise code and skips some key lookups.
2015-10-26 17:38:19 -04:00
Peter Scheibel
9576860f8c Making SpackError reference consistent. 2015-10-26 14:27:44 -07:00
Peter Scheibel
6a16040462 Automatically create a 'test-output' directory in the current directory if no
output path is specified. Test output files are placed in this directory.
Furthermore the filenames now have the prefix "test" (but otherwise are the
string representation of the spec ID as before).
2015-10-26 11:58:52 -07:00
Todd Gamblin
ead8ac58c6 Working Lock class, now uses POSIX fcntl locks, extensive unit test.
- llnl.util.lock now uses fcntl.lockf instead of flock
  - purported to have more NFS compatibility.

- Added an extensive test case for locks.
  - tests acquiring, releasing, upgrading, timeouts, shared, & exclusive cases.
2015-10-24 19:57:43 -07:00
Todd Gamblin
908a93a470 Add a multiprocess Barrier class to use for testing parallel code. 2015-10-24 19:54:52 -07:00
Peter Scheibel
cc0ee3dc29 The HTML number conversion regex operating against a byte string will only
convert individual bytes, so therefore incorrectly converts utf-8 encoded
characters. Decoding byte strings to unicode objects results in correct HTML
number encodings.
2015-10-23 20:56:06 -07:00
Peter Scheibel
d76c923623 1. Rename CommandError -> InstallError
2. InstallError now subclasses SpackError vs. StandardError (so it is now
handled by the spack shell script)
2015-10-23 16:18:06 -07:00
Peter Scheibel
ea872f8098 1. Added CommandError exception to build_environment
2. The parent of a failed child process in build_environment.fork no longer
calls sys.exit - instead it raises a CommandError (from [1])
3. test-install command now attempts to install all packages even if one fails
2015-10-22 17:44:16 -07:00
Peter Scheibel
246423b4b4 Generate test results (designated as skipped) for parents of failed dependencies 2015-10-22 16:00:03 -07:00
Todd Gamblin
b6833f08df Merge pull request #129 from mathstuf/separate-prefix
spack: split spack_root from prefix
2015-10-21 16:04:36 -04:00
Todd Gamblin
3c788147ca Add Spack logo. 2015-10-18 19:14:40 -07:00
Todd Gamblin
7598612b86 Better info variant output. 2015-10-17 17:34:39 -07:00
Peter Scheibel
39f0f000f8 Created unit test for core logic in test-install command. 2015-10-15 22:02:14 -07:00
Peter Scheibel
6cd976d036 Better description for test-install command 2015-10-15 20:13:08 -07:00
Peter Scheibel
49b91235bb Minor edit for clarity (generate output for single top level spec vs. iterating
through collection of size 1)
2015-10-15 19:59:57 -07:00
Peter Scheibel
82ed1bc343 Originally I enforced specifying 1 top-level package with the test-install
command by having it consume exactly 1 positional argument (i.e. by removing
"nargs=argparse.REMAINDER") but this does not work when configuring dependencies
of a top-level package (which show up as additional positional args). Instead
now there is an explicit check to ensure there is only 1 top-level package.
2015-10-15 19:38:47 -07:00
Peter Scheibel
e451421db3 1. Specifying the output file path for test-install is now an option (vs. an
argument). The default path is [package id].xml in the CWD where test-install
is called from.

2. Fixed a bug with package.build_log_path (which was added in this branch).

3. keep_stage for package.do_install is now set. This allows uninstalling and
reinstalling packages without (re) downloading them.
2015-10-15 19:22:36 -07:00
Peter Scheibel
4997f0fe57 Move logic for tracking the build log into package.py (since that is what is
managing the build log) and expose as package.build_log_path.
2015-10-15 12:44:02 -07:00
Peter Scheibel
c985ad7644 Update test failure output: don't include the entire build log, just lines which
mention errors (or if no such lines can be found, output the last 10 lines from
the log).
2015-10-15 12:23:56 -07:00
Peter Scheibel
b9bf0b942c Use spec.traverse vs. recursive function.
Also even though I calculated which installs are new (e.g. vs. packages that
have already been installed by a previous command) I forgot to make use of that
in create_test_output (so I was always generating test output even if a package
had been installed before running the test-install command).

Note to avoid confusion: the 'handled' variable (removed in this commit) did not
serve the same purpose as 'newInstalls': it was originally required because the
recursive approach would visit the same dependency twice if more than one
package depended on it.
2015-10-15 11:52:08 -07:00
Peter Scheibel
f2b4341ad6 Always run with verbose output (so eliminate it as an option). Also remove other
commented options.
2015-10-15 10:45:03 -07:00
Peter Scheibel
11861fb8d7 Changing name of file requires changing function name to be invoked as a command 2015-10-15 10:35:42 -07:00
Peter Scheibel
e3d703b80f Change name of file to conform to conventions. 2015-10-15 10:33:39 -07:00
Peter Scheibel
2ae7839b66 Edit function names to conform to naming conventions. 2015-10-15 10:26:13 -07:00
Peter Scheibel
0d66362cee Only install 1 top-level package with testinstall. Otherwise if multiple
packages are specified and a prior one fails, it will prevent any of the others
from succeeding (and generating test output) even if they don't share
dependencies.
2015-10-15 10:17:08 -07:00
Ben Boeckel
3ce85b2270 spack: split spack_root from prefix
A foundation for allowing runtime configuring of the prefix.
2015-10-15 09:27:05 -04:00
Peter Scheibel
71dcf8833c Make sure to generate output for dependencies as if they were separate tests:
the original intent was to generate output as if each package was a unit test,
but I noticed that I was only generating test output for top-level packages.
2015-10-13 19:02:41 -07:00
Peter Scheibel
1ce6d8b627 Add spec YAML format to test output. 2015-10-13 10:41:47 -07:00
Todd Gamblin
d16095c856 Add forgotten file from previous commit. 2015-10-13 10:35:19 -07:00
Peter Scheibel
9f56d9c807 Don't create test output for any package that was already installed. 2015-10-12 20:56:03 -07:00