testport: Fix failed build not finalizing the log