GNOME Bugzilla – Bug 786497
Have 'meson test' run unit tests
Last modified: 2017-10-04 16:29:07 UTC
gnome-shell master $ ninja -C builddir test ninja: Entering directory `builddir' [0/1] Running all tests. No tests defined. I would like to see 'meson test' run the unit tests. In Ubuntu, I was running the unit tests as part of the gnome-shell package build with a command like this GSETTINGS_SCHEMA_DIR=builddir/data xvfb-run builddir/tests/run-test.sh -v tests/unit/*.js But now I get this error: (run-js-test:23807): GLib-GIO-ERROR **: Settings schema 'org.gnome.shell' is not installed The GSETTINGS_SCHEMA_DIR variable worked with 3.24 but I don't know why it's not working here.
Created attachment 357968 [details] [review] build: Run unit tests on `meson test` Meson makes it easy to define unit tests, so hook up the existing ones.
Thanks, but gnome-shell doesn't build for me with the patch. $ meson builddir (skip lines…) Configuring org.gnome.shell.gschema.xml using configuration Program glib-compile-schemas found: YES (/usr/bin/glib-compile-schemas) Configuring run-test.sh using configuration Meson encountered an error in file tests/meson.build, line 13, column 0: Second argument must be executable.
Works with 0.42.0 here - presumably there was some fix to accept configure_file() output as executable at some point.
(In reply to Florian Müllner from comment #3) > Works with 0.42.0 here - presumably there was some fix to accept > configure_file() output as executable at some point. Thanks! It works well after I updated meson to 0.42.0.
Created attachment 360275 [details] [review] build: Run unit tests on `meson test` Cut down on some code duplication
Attachment 360275 [details] pushed as 4543ca1 - build: Run unit tests on `meson test`