facebook / buck

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
https://buck.build
Apache License 2.0
8.56k stars 1.16k forks source link

Use original JUnit test class name instead of suite class in test XML report #2624

Closed swarren12 closed 3 years ago

swarren12 commented 3 years ago

As discussed in https://github.com/facebook/buck/issues/2623, this change will use the original test class name instead of the test suite name when generating the test output XML when run against a JUnit suite. I've based this change on the dev branch as it doesn't seem the kind of thing that needs to hit the stable branch urgently.

I've tried to keep the change as small as possible by overloading the TestCaseSummary constructor to default the new testSuite parameter to false, so that all the other usages of this aren't affected, but if it's better to push this default up to the places where this class is instantiated then I can do that instead!

One thing to note: I originally built this change on top of master, but figured that it was probably better suited to dev. It all seemed to work for me on the stable build, however since rebasing the change onto the dev branch I can no longer build the project? I don't know if this is because I'm trying to build using the latest Buck release, but it gives me an error parsing buck/programs/defs.bzl (name 'name' is not defined).

facebook-github-bot commented 3 years ago

Hi @swarren12!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

KapJI commented 3 years ago

Sorry, dev is our internal branch, I don't think we accept PRs there. Can you please submit it for master?

swarren12 commented 3 years ago

Oh, sure. That makes my life a bit easier as well as I can actually build on that branch!

(FWIW, https://github.com/facebook/buck/issues/2401 says "We welcome patches to both development and master, but encourage users to stick with master for now." so I assumed either was fine)