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

Hidden dependency on $HOME #105

Closed
pytoxbot opened this Issue Sep 17, 2016 · 2 comments

Comments

Projects
None yet
1 participant
@pytoxbot

pytoxbot commented Sep 17, 2016

tox appears to have a hidden dependency on a valid $HOME, but in some environments this is not the case. For example, when building the package for Ubuntu, the build environment deliberately sets $HOME to /sbuild-nonexistent. You can reproduce this with hg head by doing:

#!python


$ HOME=/sbuild-nonexistent tox

Traceback (most recent call last):
  File "/usr/bin/tox", line 9, in <module>
    load_entry_point('tox==1.4.2', 'console_scripts', 'tox')()
  File "/usr/lib/python2.7/dist-packages/tox/_cmdline.py", line 25, in main
    retcode = Session(config).runcommand()
  File "/usr/lib/python2.7/dist-packages/tox/_cmdline.py", line 273, in runcommand
    return self.subcommand_test()
  File "/usr/lib/python2.7/dist-packages/tox/_cmdline.py", line 353, in subcommand_test
    sdist_path = self.sdist()
  File "/usr/lib/python2.7/dist-packages/tox/_cmdline.py", line 348, in sdist
    sdistfile.dirpath().ensure(dir=1)
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 424, in ensure
    return p._ensuredirs()
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 406, in _ensuredirs
    parent._ensuredirs()
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 406, in _ensuredirs
    parent._ensuredirs()
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 409, in _ensuredirs
    self.mkdir()
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 381, in mkdir
    py.error.checked_call(os.mkdir, str(p))
  File "/usr/lib/python2.7/dist-packages/py/_error.py", line 84, in checked_call
    raise cls("%s%r" % (func.__name__, args))
py.error.EACCES: [Permission denied]: mkdir('/sbuild-nonexistent',)

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

fix issue105 -- don't depend on an existing HOME directory from tox tests.

→ <>

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @warsaw

@pytoxbot pytoxbot closed this Sep 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment