The current behavior is to generate the report by defauly, but the
feature is only used by CI. This diff changes this behavior to only
create the report file if the --junitoutput option is set.
This fixes an old issue where the test/tmp directory was not correctly
emptied after running the functional tests due to the junit file not
being removed.
Depends on D7004.