diff options
author | 2017-12-25 17:45:29 -0500 | |
---|---|---|
committer | 2017-12-25 17:45:29 -0500 | |
commit | b96557d15ca1928165b3efb4d829ea05f367ae7f (patch) | |
tree | 914452012b4076369db90b553538d53345ea7635 | |
parent | requirements/dev: add missing lxml dep for development deps (diff) | |
download | pkgcore-b96557d15ca1928165b3efb4d829ea05f367ae7f.tar.gz pkgcore-b96557d15ca1928165b3efb4d829ea05f367ae7f.tar.bz2 pkgcore-b96557d15ca1928165b3efb4d829ea05f367ae7f.zip |
pebuild: inject 'test' USE flag to pkg use if test phase is selected
-rw-r--r-- | src/pkgcore/scripts/pebuild.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pkgcore/scripts/pebuild.py b/src/pkgcore/scripts/pebuild.py index d899d8d23..76ff82290 100644 --- a/src/pkgcore/scripts/pebuild.py +++ b/src/pkgcore/scripts/pebuild.py @@ -70,9 +70,13 @@ def main(options, out, err): if "setup" in phases: phases.insert(0, "fetch") + # forcibly run test phase if selected + force_test = 'test' in phases + if force_test: + options.pkg.use.add('test') + # by default turn off startup cleans; we clean by ourselves if # told to do so via an arg - force_test = 'test' in phases build = domain.build_pkg( options.pkg, phase_obs, clean=False, allow_fetching=True, force_test=force_test) if clean: |