test_is_running() fails on OSX

On OSX, tor runs under the name tor.real (due to https://trac.torproject.org/projects/tor/ticket/10030#comment:20), but is started by calling tor, so this fails during testing:

self.assertTrue(stem.util.system.is_running(test.runner.get_runner().get_tor_command(True)))

(this is in stem/test/integ/util/system.py)

A possible workaround would be modifying the workaround for #10030 (closed) (it's workarounds all the way down) to use

exec -a tor ./tor.real "$@"

instead of

exec ./tor.real "$@"

and then changing the ps call in stem/stem/util/system.py to not use accounting, so it sees the process running as tor:

IS_RUNNING_PS_BSD = 'ps -ao comm='

instead of

IS_RUNNING_PS_BSD = 'ps -ao ucomm='

... but I'm not sure if turning off accounting is appropriate/desirable, and changing non-stem things just to fix a bug in stem tests seems like overkill.

The OSX 'weirdness' is already handled appropriately elsewhere in stem, so maybe this test should just be modified (like)

self.assertTrue(stem.util.system.is_running('tor') or stem.util.system.is_running('tor.real'))

or further upstream, set _tor_cmd in the runner in an OS-conscious manner?

Trac:
Username: corcra