Code Monkey home page Code Monkey logo

Comments (3)

csoltenborn avatar csoltenborn commented on June 17, 2024

This is a rather clear description, and you might indeed be onto something here...

from googletestadapter.

csoltenborn avatar csoltenborn commented on June 17, 2024

I had a look into this, and afa I can see, the situation is more complicated. The thing is that to be able to figure out appropriate prefixes such that exactly the desired test cases are run, I need to know about all test cases contained in the respective executable. And that's the problem: GTA is called with two "contexts", i.e., with a set of executables (e.g. if you "Run all tests") or with a set of tests (e.g. if you run a single test), For the former, test discovery has to be performed on the provided executables, and that case would be just fine. However, for the latter I would have to start discovery for each involved executable before being able to run the given tests. This would make running a single test (or a selection of tests) quite a bit slower, I believe.

Now, I see three options:

  • leave it as is (and live with the fact that tests might in some cases be run more than once)
  • Perform test discovery even in the latter case (and live with the fact that selected tests are run with a slow delay)
  • Do not use prefixes and wild cards at all, but "address" each test case separately when the arguments for Google Test are created
    The latter has the drawback that the length of the passed parameters is limited - GTA deals with this by splitting up test runs in case the limit is reached (which already happens now if necessary), and performing a separate test run for each split. This would still make sure that the correct subset of tests is run, but will add another kind of "overhead".

The best solution would maybe be to make this configurable. However, I'm a bit hesitant of that, since it's quite a bit of work for a corner case which apparently does not seem to happen very often... I will let you know.

from googletestadapter.

EvanHampton-Seequent avatar EvanHampton-Seequent commented on June 17, 2024

Yes, the "fix" I made in my PR was ignorant to basically every other use case other than the one I needed it for :). Hopefully it gave you a breadcrumb for triaging the problem though.

I had also thought that configurability would be the best option, but certainly the most work.

Thank you for looking into it and keeping me in the loop - much appreciated.

from googletestadapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.