GRADLE-2915 - avoid creating an empty test results file, using a null check internally instead.