Only build the tests when testing.
Merge pull request #420 from Mantle/only-build-tests-when-testing

Only build the tests when testing.