I'm in the process of refactoring the top level code for the torrent and tracker so that it can more easily be run from test code.
The current swarm test invokes the Taipei-Torrent executable. That's not hermetic, because the test has a dependency on the Taipe-Torrent binary, which might get out of sync with respect to the test.
For example, the Travis-CI test can't even find the Taipei-Torrent binary, which is why the Travis-CI tests are failing.
I think I found a work-around for this issue by studying the exec package's self test code: The torrent swam test can invoke itself in a separate process with a special environment parameter that tells the test to run as a tracker and/or torrent client instead of as a test.
Because the test is invoking the test's binary rather than some other binary, the binary is sure to be in sync with the test. And the test should be able to find its own path, so it should not have trouble running another copy of its own binary.
It is not a 100% end-to-end test, because the Taipei-Torrent's "main" function is not tested. But it's a hermetic 98% coverage test, which is a pretty good deal.
In order for this to work I need to figure out if the test can write to library "flag" variables. It seems like something tests should be able to do, but I need to do some research.