Skip to content
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

meson test with a specific test should only build what is needed for the test #7473

Closed
alex-tee opened this issue Jul 19, 2020 · 5 comments · Fixed by #7902
Closed

meson test with a specific test should only build what is needed for the test #7473

alex-tee opened this issue Jul 19, 2020 · 5 comments · Fixed by #7902

Comments

@alex-tee
Copy link
Contributor

it's an usual workflow of mine to fix something and retest to see if it's fixed (using a particular test), but i have 30 tests now and i need to wait for all of them to finish linking, when i already specified the test i want to run

I think meson should be smart here and only build what's needed for the test (or suite) i specified

@alex-tee
Copy link
Contributor Author

this is actually not a big issue. I was linking a static lib to each test so it was taking a while. using both_libraries() when creating a library for my shared code and doing .get_shared_lib() for the tests and .get_static_lib() for my executable seems to work fine. tests link really fast now

@bonzini bonzini mentioned this issue Oct 11, 2020
13 tasks
@bonzini
Copy link
Collaborator

bonzini commented Oct 11, 2020

All the information that is needed here is already available in TestSerialisation for use by introspection, so it should not be hard to do.

@dcbaker
Copy link
Member

dcbaker commented Oct 11, 2020

I have an opened pr for this, there's just a couple of bugs I haven't worked out yet

@bonzini
Copy link
Collaborator

bonzini commented Oct 11, 2020

Is that #6511? It seems a bit different, in particular one is "what to build by default" and the other one is "what to rebuild" (you can rebuild more than needed and do it by default to make things safer, but the ergonomics are worse). For a large project I don't mind building tests by default, but I don't want meson test --suite unit to rebuild thousands of files while I haven't even gotten the unit tests to pass for example.

My idea for this issue was to invoke ninja with the specific targets included in depends and test arguments).

@dcbaker
Copy link
Member

dcbaker commented Oct 12, 2020

I guess my pr gets half there, since it changes meson test to depend on a target that builds only the tests and their dependencies.

bonzini added a commit to bonzini/meson that referenced this issue Oct 26, 2020
It is a usual workflow to fix something and retest to see if it is fixed using a
particular test.  When tests start to become numerous, it becomes time consuming
for "meson test" to relink all of them (and in fact rebuild the whole project)
where the user has already specified the tests they want to run, as well as
the tests' dependencies.

Teach meson to be smart and only build what is needed for the test (or suite)
that were specified.

Fixes: mesonbuild#7473
Related: mesonbuild#7830
bonzini added a commit to bonzini/meson that referenced this issue Oct 26, 2020
It is a usual workflow to fix something and retest to see if it is fixed using a
particular test.  When tests start to become numerous, it becomes time consuming
for "meson test" to relink all of them (and in fact rebuild the whole project)
where the user has already specified the tests they want to run, as well as
the tests' dependencies.

Teach meson to be smart and only build what is needed for the test (or suite)
that were specified.

Fixes: mesonbuild#7473
Related: mesonbuild#7830
bonzini added a commit to bonzini/meson that referenced this issue Oct 26, 2020
It is a usual workflow to fix something and retest to see if it is fixed using a
particular test.  When tests start to become numerous, it becomes time consuming
for "meson test" to relink all of them (and in fact rebuild the whole project)
where the user has already specified the tests they want to run, as well as
the tests' dependencies.

Teach meson to be smart and only build what is needed for the test (or suite)
that were specified.

Fixes: mesonbuild#7473
Related: mesonbuild#7830
bonzini added a commit to bonzini/meson that referenced this issue Nov 2, 2020
It is a usual workflow to fix something and retest to see if it is fixed using a
particular test.  When tests start to become numerous, it becomes time consuming
for "meson test" to relink all of them (and in fact rebuild the whole project)
where the user has already specified the tests they want to run, as well as
the tests' dependencies.

Teach meson to be smart and only build what is needed for the test (or suite)
that were specified.

Fixes: mesonbuild#7473
Related: mesonbuild#7830
bonzini added a commit to bonzini/meson that referenced this issue Nov 8, 2020
It is a usual workflow to fix something and retest to see if it is fixed using a
particular test.  When tests start to become numerous, it becomes time consuming
for "meson test" to relink all of them (and in fact rebuild the whole project)
where the user has already specified the tests they want to run, as well as
the tests' dependencies.

Teach meson to be smart and only build what is needed for the test (or suite)
that were specified.

Fixes: mesonbuild#7473
Related: mesonbuild#7830
bonzini added a commit to bonzini/meson that referenced this issue Nov 15, 2020
It is a usual workflow to fix something and retest to see if it is fixed using a
particular test.  When tests start to become numerous, it becomes time consuming
for "meson test" to relink all of them (and in fact rebuild the whole project)
where the user has already specified the tests they want to run, as well as
the tests' dependencies.

Teach meson to be smart and only build what is needed for the test (or suite)
that were specified.

Fixes: mesonbuild#7473
Related: mesonbuild#7830
bonzini added a commit to bonzini/meson that referenced this issue Nov 24, 2020
It is a usual workflow to fix something and retest to see if it is fixed using a
particular test.  When tests start to become numerous, it becomes time consuming
for "meson test" to relink all of them (and in fact rebuild the whole project)
where the user has already specified the tests they want to run, as well as
the tests' dependencies.

Teach meson to be smart and only build what is needed for the test (or suite)
that were specified.

Fixes: mesonbuild#7473
Related: mesonbuild#7830
bonzini added a commit to bonzini/meson that referenced this issue Dec 14, 2020
It is a usual workflow to fix something and retest to see if it is fixed using a
particular test.  When tests start to become numerous, it becomes time consuming
for "meson test" to relink all of them (and in fact rebuild the whole project)
where the user has already specified the tests they want to run, as well as
the tests' dependencies.

Teach meson to be smart and only build what is needed for the test (or suite)
that were specified.

Fixes: mesonbuild#7473
Related: mesonbuild#7830
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants