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

1.10.4: installed_tests=true tests=true does not build, execute and install any tests #210

Open
kloczek opened this issue Feb 10, 2021 · 5 comments

Comments

@kloczek
Copy link

kloczek commented Feb 10, 2021

I'm using below set of meson settings:

        -D gtk_doc=true \
        -D installed_tests=true \
        -D introspection=enabled \
        -D tests=true \
[tkloczko@barrel x86_64-redhat-linux-gnu]$ ninja test
[0/1] Running all tests.
No tests defined.

And the same none of the tests are installed as well.

@kloczek
Copy link
Author

kloczek commented Feb 10, 2021

Just checked 1.10.2 and everytjing is as expected.

@kloczek kloczek changed the title 1.10.4: installed_tests=true tests=true does not buildexecute and install any tests 1.10.4: installed_tests=true tests=true does not build, execute and install any tests Feb 10, 2021
@ebassi
Copy link
Owner

ebassi commented Feb 10, 2021

Does not reproduce, using the same set of options:

meson setup -Dgtk_doc=true -Dinstalled_tests=true -Dintrospection=enabled -Dtests=true _build .
meson compile -C _build
meson test -C _build
ninja: Entering directory `/var/home/ebassi/gnome/source/graphene/_build'
ninja: no work to do.
 1/21 mutest / general      OK             0.02s
 2/21 mutest / hooks        OK             0.03s
 3/21 mutest / types        OK             0.03s
 4/21 graphene / box        OK             0.01s
 5/21 graphene / euler      OK             0.02s
 6/21 graphene / frustum    OK             0.02s
 7/21 graphene / matrix     OK             0.01s
 8/21 graphene / plane      OK             0.02s
 9/21 graphene / point      OK             0.01s
10/21 graphene / point3d    OK             0.01s
11/21 graphene / quad       OK             0.02s
12/21 graphene / quaternion OK             0.01s
13/21 graphene / ray        OK             0.03s
14/21 graphene / rect       OK             0.02s
15/21 graphene / simd       OK             0.02s
16/21 graphene / size       OK             0.02s
17/21 graphene / sphere     OK             0.02s
18/21 graphene / triangle   OK             0.02s
19/21 graphene / vec2       OK             0.01s
20/21 graphene / vec3       OK             0.02s
21/21 graphene / vec4       OK             0.01s

Ok:                 21  
Expected Fail:      0   
Fail:               0   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   

Full log written to /var/home/ebassi/gnome/source/graphene/_build/meson-logs/testlog.txt

Nothing has changed in the tests between 1.10.2 and 1.10.4; you may want to bisect the Git history, or check if something has changed in your own environment.

The only reason why tests would be disabled is if the mutest dependency is not available, and if subprojects were disabled.

@kloczek
Copy link
Author

kloczek commented Mar 10, 2021

I found ehat is causing that.
In testx/mesoon.build is:

# Make tests conditional on having mutest-1 installed system-wide, or
# available as a subproject
mutest_dep = dependency('mutest-1',
  fallback: ['mutest', 'mutest_dep'],
  default_options: ['static=true'],
  required: false,
  disabler: true,
)

if mutest_dep.found()
  foreach unit: unit_tests
[..]
  endforeach
endif
```
I have no installed `mutest-1`. Where I can find that library?

And it is a bit odd that current logic does not warn that without installed `mutest-1` test suite will be not generated and/or installed.

@ebassi
Copy link
Owner

ebassi commented Mar 10, 2021

I have no installed mutest-1. Where I can find that library?

It's available here: https://github.com/ebassi/mutest

And it is a bit odd that current logic does not warn that without installed mutest-1 test suite will be not generated and/or installed.

That's because mutest is included as a Meson sub-project. If Graphene cannot find mutest installed, it'll automatically fall back to cloning and building a static, uninstalled copy of mutest inside the subprojects directory; unless you build Graphene with --wrap-mode=nofallback, in which case Meson will not fall back to the subproject copy of mutest.

Of course, if you:

  • do not install mutest
  • disable subproject fallback

then Graphene can only disable the tests.

@kloczek
Copy link
Author

kloczek commented Mar 10, 2021

I'm using autogenerated tagged tar balls so that tar ball does not have mutest :)
Instead including that subproject IMO it woild be better to have hard dependency and fail if tests=true and not found mutest.
OK will try to package mutest and than will beck :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants