[Tests] Fix output format so we retrieve the flags in tests. This API should not be considered stable yet.