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

Comments

@davehunt
Copy link
Contributor

@davehunt davehunt commented Jun 22, 2016

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
@The-Compiler
Copy link
Member

@The-Compiler The-Compiler commented Aug 5, 2016

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
Member

@feuillemorte feuillemorte commented Jan 17, 2018

I take it

@nicoddemus
Copy link
Member

@nicoddemus nicoddemus commented Jan 17, 2018

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

feuillemorte added a commit to feuillemorte/pytest that referenced this issue Jan 17, 2018
feuillemorte added a commit to feuillemorte/pytest that referenced this issue Jan 17, 2018
feuillemorte added a commit to feuillemorte/pytest that referenced this issue Jan 17, 2018
feuillemorte added a commit to feuillemorte/pytest that referenced this issue Jan 17, 2018
@feuillemorte
Copy link
Member

@feuillemorte feuillemorte commented Jan 18, 2018

#3127

All checks have passed

Please review :)

feuillemorte added a commit to feuillemorte/pytest that referenced this issue Jan 20, 2018
feuillemorte added a commit to feuillemorte/pytest that referenced this issue Jan 25, 2018
feuillemorte added a commit to feuillemorte/pytest that referenced this issue Jan 25, 2018
feuillemorte added a commit to feuillemorte/pytest that referenced this issue Jan 31, 2018
feuillemorte added a commit to feuillemorte/pytest that referenced this issue Jan 31, 2018
feuillemorte added a commit to feuillemorte/pytest that referenced this issue Jan 31, 2018
feuillemorte added a commit to feuillemorte/pytest that referenced this issue Feb 1, 2018
nicoddemus added a commit that referenced this issue Feb 7, 2018
#1642 add rootdir option
@feuillemorte
Copy link
Member

@feuillemorte feuillemorte commented Feb 11, 2018

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants