-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
how to run a test after that another test finished? #3806
Comments
This is not supported. The common approach here is to alter the build setup so that one test both generates the files and checks that the output is correct. Splitting it in two like that seems a bit arbitrary and strange. |
thanks @jpakkane, would you mind to share a snippet of code to show how you would implement that? |
This has nothing to do with Meson, it is just a question of refactoring your code. In very rough pseudocode you'd go from this:
To a single file with something like:
|
thanks @jpakkane, I see your point, but that it is not always viable. In my case, the tests generate thousands of files which are compared with scientifically validated files for each test. A comparison written in python or bash is much more suitable in this scenario. If you give me a hint where to start I could propose a patch for that |
If you define the first test after the generator tests (or the first test that does file verification) as |
thanks @jpakkane, that makes sense. I have a question on this: is slicing supported?
but I got
|
I think that is not supported because class Parser does not accept column when parsing parenthesis (meson/mesonbuild/mparser.py) |
Slicing is not supported yet. |
Is there a way to specify to run a test (e.g.,
diff on generated outputs
) after that a test generated those outputs?My code has a lot of tests that checks the code runs, and in another set of tests the produced output is checked.
We have, e.g.,
test1
(which runs and produces output files) andtest1.compare
that compares the output with the reference. This for a lot of tests. Up to now the only solution I came up with is to set the keyword 'is_parallel: falseto all the
.comparetests. I don't like this approach since the
.compare`s are run only after all the other tests, and in serial.In CMake you can do this as follows
I know I could wrap the run and the diff inside a bash script for example, but I like to have the just_run test such that I can run it with the options provided by
meson test
like--gdb
or--wrapper="valgrind -v"
The text was updated successfully, but these errors were encountered: