GithubHelp home page GithubHelp logo

Comments (14)

roigcarlo avatar roigcarlo commented on August 19, 2024 2

As a side effect. My idea is not only create a separate binary but also a separate lib with the tests. so te core will have:

  • KratosCore.so
  • Kratos.so ( depends on KratosCore )
  • KratosTests.so ( depends on KratosCore )
  • RunKratos
  • RunTests ( depends on KratosTests.so )

Also the proble with the link times is the LTO, we have been running some tests last week and we will probably reove it.

from kratos.

roigcarlo avatar roigcarlo commented on August 19, 2024 1

So, the skeleton its done, and it works:
https://github.com/KratosMultiphysics/Kratos/tree/testing/split-core-tests

There are some of the points I wanted to do that are completed (For the core):

  • Creating a separate lib with the tests
  • Creating a separate entry point for the test in python (its a submodule of the app now)
  • Creating a executable that wrapps the functions of the tester class (right now only RunAllTests() for test purposes)

As for the apps, there are some problems.

  • If we link the test library against the core executable, the application is not registered and there are a bunch of elements, conditions, variables, etc... that are missing, causing the tests from the app not working
  • We can register the app, but that means that the code of the testes has to be aware of all existing apps having cpp tests, which I think is not ideal
  • Alternatively, if we make one executable per app, it has to be hard-coded so it register the app it tries to run, which requires maintenance, so it is also something that I don't like.

I know that we decide to create one separate binary for every app but that was mainly because I said it was impossible to create a unified binary, which is actually possible and very easy, so what do you think we should do with the current situation?

from kratos.

roigcarlo avatar roigcarlo commented on August 19, 2024

I like the idea of decoupling the tests from the core πŸ‘

About the executable file, no problem as well but I have some concerns:

  • I recall @pooyan-dadvand telling me he doesn't want C++ executable files ( or I am making it up? sorry my memory... )
  • How should this behave? If we are going to make it something "official" we must speak about some topics such as:
    • Is it going to be an interactive command line to run the tests?
    • Run all the tests without asking the user?
    • Should we be able to pass arguments?

from kratos.

pooyan-dadvand avatar pooyan-dadvand commented on August 19, 2024
  • actually I like to have a direct executable for cpp tests because it makes the debugging and especially profiling much easier

  • some command line ese which accepts arguments to define tests or suits would be enough

from kratos.

pooyan-dadvand avatar pooyan-dadvand commented on August 19, 2024

Technical committee: The idea is to create a CTest executable for core and each application

from kratos.

loumalouomega avatar loumalouomega commented on August 19, 2024

from kratos.

pooyan-dadvand avatar pooyan-dadvand commented on August 19, 2024

It should

from kratos.

loumalouomega avatar loumalouomega commented on August 19, 2024

Can we consider this as solved?, or not until we add the CTest compatibilty?

from kratos.

roigcarlo avatar roigcarlo commented on August 19, 2024

It is not solved, tests are still compiled as part of the owner application.

I tried to split it in the past abd it gave me some problems in win, but I am pretty confident in being able to do it now. I can spend some time to it next week.

from kratos.

philbucher avatar philbucher commented on August 19, 2024

if the tests are in a separate exe then we also won't have to link the entire Kratos again after changing a test in the core right?

from kratos.

philbucher avatar philbucher commented on August 19, 2024

any news here?

from kratos.

roigcarlo avatar roigcarlo commented on August 19, 2024

Actually its almost ready, I will probalby make a commit with this next week

from kratos.

philbucher avatar philbucher commented on August 19, 2024

Nice job πŸ‘

I am not really familiar with the details but I have a possibly related comment regarding the usage of the C-tests:

I am currently trying to solve the problems I introduced in #3007 => there I import all apps and then run the tests, but as already mentioned here it would be better to run the tests in AssembleTestSuites in test_xxxAPplication.py
Long story short, from this point of view it would be nice to be able to run the tests of only one app, not sure if it is related to this though (maybe easier if we have separate libs for the tests of each app), if not sorry for the noise

from kratos.

roigcarlo avatar roigcarlo commented on August 19, 2024

Closing this as the discussion has moved to #10858

from kratos.

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.