split out test results functionality

Change-Id: Ibacee6c959f07eb65f5ddfc69566ae627c5dedf2