Skip to content
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

Allow users to explicitly specify the path of the root directory #1642

Closed
davehunt opened this issue Jun 22, 2016 · 5 comments
Closed

Allow users to explicitly specify the path of the root directory #1642

davehunt opened this issue Jun 22, 2016 · 5 comments
Labels
good first issue easy issue that is friendly to new contributor type: enhancement new feature or API change, should be merged into features branch
Milestone

Comments

@davehunt
Copy link
Contributor

The root directory discovery is convoluted, and there are cases where it fails to resolve to a suitable path. We should improve the discovery as much as possible, but it also makes sense to provide a way for users to explicitly specify the root directory.

We could add a --rootdir command line option, which would be relative to the invocation directory. We could also add a rootdir configuration key, which would override the command line option, and would be relative to the configuration file.

@RonnyPfannschmidt RonnyPfannschmidt added this to the 3.0 milestone Jun 27, 2016
@blueyed blueyed added the type: enhancement new feature or API change, should be merged into features branch label Jun 27, 2016
@The-Compiler
Copy link
Member

Didn't someone work on this during the sprint? Also, while this is a nice feature, it shouldn't block 3.0. Changing the milestone to 3.1 for now.

@feuillemorte
Copy link
Contributor

I take it

@nicoddemus
Copy link
Member

@feuillemorte awesome, let us know if you hit any roadblock. 👍

@feuillemorte
Copy link
Contributor

#3127

All checks have passed

Please review :)

@feuillemorte
Copy link
Contributor

Merged

jsirois added a commit to jsirois/pants that referenced this issue May 21, 2019
+ Use `--rootdir` to set the rootdir ahead of time and use the buildroot
  for sensible RHS paths in `-v` output (previously we only had sensible
  LHS paths via the `NodeRenamerPlugin`). This option was introduced
  relatively recently in 3.5.0:
    https://docs.pytest.org/en/latest/changelog.html#pytest-3-5-0-2018-03-21
    pytest-dev/pytest#1642
+ Control the `.pytest_cachedir` location with `-o` and move it into the
  task workdir (defaults to the `--rootdir` otherwise).
+ Simplify `pytest.ini` nullification by pointing to os.devnull instead
  of embedding an empty `pytest.ini` in the pytest pex.
jsirois added a commit to pantsbuild/pants that referenced this issue May 22, 2019
+ Use `--rootdir` to set the rootdir ahead of time and use the buildroot
  for sensible RHS paths in `-v` output (previously we only had sensible
  LHS paths via the `NodeRenamerPlugin`). This option was introduced
  relatively recently in 3.5.0:
    https://docs.pytest.org/en/latest/changelog.html#pytest-3-5-0-2018-03-21
    pytest-dev/pytest#1642
+ Control the `.pytest_cachedir` location with `-o` and move it into the
  task workdir (defaults to the `--rootdir` otherwise).
+ Simplify `pytest.ini` nullification by pointing to os.devnull instead
  of embedding an empty `pytest.ini` in the pytest pex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue easy issue that is friendly to new contributor type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

6 participants