The Tramp tests are the slowest tests in Emacs's test suite, even when they aren't set up to access a remote machine. After a little investigation I think the cause of the slowness is excessive memory allocation. I modified ert-run-tests to print memory statistics after each test and found that tramp-tests.el, which takes 100 seconds to run on my machine, is spending 39 seconds doing garbage collection, and by the end of the test run has allocated and freed 27 million strings. Here is a log file with memory statistics: