-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recover coverage from subprocesses during unit tests #15354
Recover coverage from subprocesses during unit tests #15354
Conversation
Moving pytest.ini to Spack's root folder since apparently moving to another folder during tests causes 'coverage' to output coverage files within lib/spack/spack/test with no coverage data. Currently spack test can be run from any directory, but coverage will be correctly measured only if run from Spack root folder.
Can anybody stress test the |
The only downside I see here is that this means we’ll need to specify full paths (from root) to individual test files, right? |
Yes, that's one change. I was wondering if there are others that I missed. Also coverage is computed correctly only from Spack root, otherwise we suffer from the same problem when we move into the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I ran it locally using coverage 5.0.3
and it shows coverage of build_process
.
I get a lot of the following messages, which cause several of the tests to fail:
warning: No data was collected. (no-data-collected)
I'd need to re-run it to find the errors since they scrolled off my terminal window and the coverage reports don't provide that information.
Is anyone else getting these messages? Should we be disabling or investigating them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I get them too and they are the cause of the three or four changes to |
All the failing tests have been fixed in the PR - at least all the ones that are run on Travis. Is there any chance that you are running some of the skipped tests on another machine (here I'm specifically thinking of locking)? |
|
UPDATE: Nvm. Ignore the errors below. I was re-directing test output to a file, which is not (yet) supported.
The following tests are getting
|
Thanks! |
* Recover coverage from subprocesses during unit tests
…upstream_master * commit 'e2b1737a42c9c0c796671f9dd0c39f623e4c91c0': (1343 commits) update CHANGELOG.md for 0.14.1 version bump: 0.14.1 multiprocessing: allow Spack to run uninterrupted in background (spack#14682) Cray bugfix: TERM missing while reading default target (spack#15381) Upstreams: don't write metadata directory to upstream DB (spack#15526) Creating versions from urls doesn't modify class attributes (spack#15452) bugfix: fix install_missing_compilers option bug from v0.14.0 (spack#15416) bugfix: installer.py shouldn't be executable (spack#15386) Add function replace_prefix_nullterm for use on mach-o rpaths. (spack#15347) ArchSpec: fix semantics of satisfies when not concrete and strict is true (spack#15319) suite-sparse: fix installation for v5.X (spack#15326) testing: increase installer coverage (spack#15237) bugfix: resolve undefined source_pkg_dir failure (spack#15339) Bugfix: resolve StopIteration message attribute failure (spack#15341) Recover coverage from subprocesses during unit tests (spack#15354) Correct pytest.raises matches to match (spack#15346) bugfix: Add dependents when initializing spec from yaml (spack#15220) Uniquify suffixes added to module names (spack#14920) bugfix: ensure proper dependency handling for package-only installs (spack#15197) Fix for being able to 'spack load' packages that have been renamed. (spack#14348) ... # Conflicts: # .travis.yml # lib/spack/spack/modules/common.py # var/spack/repos/builtin/packages/mofem-cephas/package.py # var/spack/repos/builtin/packages/mofem-fracture-module/package.py # var/spack/repos/builtin/packages/mofem-users-modules/package.py # var/spack/repos/builtin/packages/python/package.py
Moving
pytest.ini
to Spack's root folder since apparently moving to another folder during testscauses
coverage
to output coverage files withinlib/spack/spack/test
with no coverage data.Currently
spack test
can be run from any directory, but coverage will be correctly measured only if run from Spack's root folder.