Revised and rebased patch: https://github.com/torproject/tor/pull/399
Thanks, looks good! I did have one more small change that I wrote in a comment on the pull request. Sorry for not noticing the job speed thing earlier.
do you think the stem version check is good enough, or do you want it to be more robust against stem being broken?
I think it's ok to fail the tor build if python can't import stem.
But we'll need to be careful using stem master. If a bad commit is pushed to stem master, all our tor builds will break.
Usually, projects test against latest stable release of their dependencies. But major stem releases are a year apart, which means that we won't be testing the latest tor features. (And we really need to test the latest features.)
So if we're going to test tor against stem master, let's make sure that stem also tests against tor master (or nightly), so we catch broken builds as soon as possible.
I opened #28170 (closed) for this change to stem, I have to do the same thing for chutney in #27912 (moved), so I'll just copy the config across.
Summarizing some IRC discussion, it seems reasonable to just go ahead and try using stem master for running make test-stem, and disable it (or add it to allowed_failures) if it becomes too unreliable.