briandunn/flatware — pull request #14 by chriserin (2013-09-04 17:22:39+00:00)
Title: make flatware the group leader always; check for group pids after the sc...

...enario

Although all the cucumber scenarios passed when running `cucumber`, a number of cucumber scenarios failed when running `flatware cucumber`. These failures were due to the after hook checking for flatware processes and finding the flatware processes of the other tests running in parallel.

This solution checks for pids that have the group id of the flatware process. Its enabled by making flatware the group leader for all cases. Previously flatware was the group leader when run from the command line but wasn't the group leader when run from cucumber/aruba. I have no idea what the down-the-road consequences might be of making flatware the group leader, but it feels right.

The solution is also enabled by subclassing Aruba's SpawnProcess class in order to gain access to the pid. I think Aruba doesn't allow access to the pid because its trying to remain OS agnostic, but flatware is a unix-flavor app, so this hack should be helpful in testing a pid heavy command-line tool, I think/hope!