Comments (14)
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.
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.
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.
-
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.
Technical committee: The idea is to create a CTest executable for core and each application
from kratos.
from kratos.
It should
from kratos.
Can we consider this as solved?, or not until we add the CTest compatibilty?
from kratos.
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.
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.
any news here?
from kratos.
Actually its almost ready, I will probalby make a commit with this next week
from kratos.
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.
Closing this as the discussion has moved to #10858
from kratos.
Related Issues (20)
- [GeoMechanicsApplication] Rename some element types in GeoMechanicsApplication
- [GeoMechanicsApplication] Add integration tests for Dirichlet boundary conditions
- Add more unit tests for the thermal element class template
- [StructuralMechanicsApplication] missing rotational dofs for 3D in GetDofList in base_load_condition.cpp HOT 5
- [GeoMechanicsApplication] Add variables for micro-climate
- [ROMApplication] Test Failure in TestLeastSquaresPetrovGalerkinROMBuilderAndSolver
- [Question] KRATOS_DOF_TRAITS macro? HOT 1
- [Core] Incorrect AMGCLSolver::mBlockSize HOT 5
- Does slip conditions work for quadratic elements? HOT 14
- Add energy convergence criterion
- [GeoMechanicsApplication] Define a new condition for micro-climate
- Github Copilot
- [GeoMechanicsApplication] Fix differences in results for CAUCHY_STRESS between python/C++ route settlement
- [GeoMechanicsApplication] Thermal tests documentation
- [GeomechanicsApplication] missing rotation and derivative components in newmark UPw dynamic scheme
- [PFEMFluid] Possible missuse of elements' InitializeSolutionStep in 2-step strategy HOT 1
- [GeoMechanicsApplication] Bug: Initialization in test_helper of staged analysis has side-effects on available variables HOT 3
- [IO] In vtk_ouput.cpp non initialized variables are written to file, which crashes the computation
- How can we use the Mooney Rivlin law in 3D ? HOT 11
- [GeoMechanicsApplication] Rotation DOFS are not added in residualbased_block_builder_and_solver_with_mass_and_damping.h
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kratos.