-
Notifications
You must be signed in to change notification settings - Fork 112
add support for {#} similar to parallel #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This mainly targets a different direction than #81 as rather than attempting to merge the resulting output inside the script, it just allows the script to have the xmls be produced to different files, but does allow the script to be used inside gitlab-ci by using something like artifacts:
when: always
reports:
junit: reports/*.xml in their yml file |
Intuitively I think #81 would make more sense as an approach to support, but it stalled out. Would this solve something else than #81 does? At first glance it looks like a workaround for #81 having stalled. This part to me was somewhat worrying and I haven't seen anything since that comment: "The merging of the xml fails, if one of the tests crashes the test itself. Which happens for me with glog and CHECK(...). This creates a SIGABRT. The merge fails because no xml is created for that test." |
Well, the original intention for this PR was something of a workaround for #81 being stalled, but in a sense, is more general since it does not care about if the This was originally inspired by parallel since at one point I fiddled around with filtering the output of The primary reason why I did not look into continuing #81 is simply because of my lack of python skill, so I have no confidence in being able to complete what that PR attempts to accomplish in the same time period as what it took for this modification |
I think the real solution should end up solving #81. I think this is better suited on a local branch, I'm wary of adding parameter support in general for things that are not supported in upstream gtest (and am very aware that I've done so in the past, imo -r shouldn't exist, but rather be just --gtest_repeat). |
allows for `--gtest_output=xml:reports/report_{#}.xml` to be used instead of relying on googletest itself to lock a unique filename and using that Signed-off-by: Christopher Degawa <[email protected]>
via wrapper which modifies the environment per test Workaround for google/gtest-parallel#89
Until this is merged, here is a workaround which doesn't require modifying gtest-parallel, though it changes environment vars, not command line |
allows for
--gtest_output=xml:reports/report_{#}.xml
to be used insteadof relying on googletest itself to lock a unique filename and using that
usage would be something like
python \ gtest_parallel.py \ --print_test_times \ ./unit_tests \ -- \ --gtest_output="xml:reports/{#}.xml"
and then uploading the
reports/*.xml
files for junit reports or using something like junitparser to merge them together.Formatted using yapf, so that's where the extra spaces come from.