GNOME Bugzilla – Bug 772928
build: Add installed-tests support
Last modified: 2017-01-17 10:43:05 UTC
Small patch series to reorganise the tests a bit to can add installed-tests support: https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests
Created attachment 337704 [details] [review] tests: Move test C sources into the tests subdirectory This improves tab-completion in the source directory, and means all the test code is in one directory. Split the build configuration for them out into a separate makefile, in preparation for adding installed-tests support there.
Created attachment 337705 [details] [review] tests: Remove duplicate return statement
Created attachment 337706 [details] [review] tests: Move nominatim-*.json to tests directory So they are with the other test JSON files. This also removes the need for TEST_SRCDIR — we can now use g_test_build_filename() instead, which uses the G_TEST_SRCDIR/G_TEST_BUILDDIR environment variables which will eventually be passed in by glib-tap.mk (in following commits).
Created attachment 337707 [details] [review] build: Add installed-tests support This means the tests are installed on the system, and can be run using gnome-desktop-testing-runner geocode-glib-1.0 This means they will be run as integration tests on systems like gnome-continuous, which may help to catch bugs caused by integration changes with other modules. The tests themselves have not actually changed.
Created attachment 337708 [details] [review] build: Clean m4 directory on maintainer-clean It should be deleted then.
Review of attachment 337704 [details] [review]: ::: geocode-glib/test-gcglib.c @@ +184,3 @@ g_autoptr (GError) error = NULL; + cache_path = g_dir_make_tmp ("tests-geocode-glib-XXXXXX", &error); The rest of the changes in this file seem unrelated.
Review of attachment 337705 [details] [review]: Yep
Review of attachment 337706 [details] [review]: Sure.
Review of attachment 337707 [details] [review]: Sure. ::: geocode-glib/tests/Makefile.am @@ -28,3 @@ geocode-glib.c -geo_uri_LDADD = $(top_builddir)/geocode-glib/libgeocode-glib.la $(GEOCODE_LIBS) This optimisation should be in a separate patch.
Review of attachment 337708 [details] [review]: Sure
Review of attachment 337704 [details] [review]: ::: geocode-glib/test-gcglib.c @@ +184,3 @@ g_autoptr (GError) error = NULL; + cache_path = g_dir_make_tmp ("tests-geocode-glib-XXXXXX", &error); They’re because the test was renamed from `test-gcglib` to `tests/geocode-glib`, so they ensure all the paraphernalia still matches the test name.
Review of attachment 337707 [details] [review]: ::: geocode-glib/tests/Makefile.am @@ -28,3 @@ geocode-glib.c -geo_uri_LDADD = $(top_builddir)/geocode-glib/libgeocode-glib.la $(GEOCODE_LIBS) OK, will do when pushing.
Attachment 337704 [details] pushed as 38e54cf - tests: Move test C sources into the tests subdirectory Attachment 337705 [details] pushed as fc577c6 - tests: Remove duplicate return statement Attachment 337706 [details] pushed as 9baf551 - tests: Move nominatim-*.json to tests directory Attachment 337707 [details] pushed as f1650be - build: Add installed-tests support Attachment 337708 [details] pushed as 0dfe4a2 - build: Clean m4 directory on maintainer-clean