After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734370 - Build installed tests
Build installed tests
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-06 16:37 UTC by Vadim Rutkovsky
Modified: 2016-06-07 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add --enable-installed-tests (10.07 KB, patch)
2014-08-06 16:37 UTC, Vadim Rutkovsky
needs-work Details | Review
Add --enable-installed-tests v2 (10.79 KB, patch)
2014-08-19 13:59 UTC, Vadim Rutkovsky
committed Details | Review
test: Use system services in installed tests (1.04 KB, patch)
2015-08-11 06:47 UTC, Ondrej Holy
none Details | Review
test: Use system paths in installed tests (3.82 KB, patch)
2016-05-27 08:39 UTC, Ondrej Holy
committed Details | Review

Description Vadim Rutkovsky 2014-08-06 16:37:55 UTC
Created attachment 282720 [details] [review]
Add --enable-installed-tests

This patch allows building installed tests (see https://wiki.gnome.org/action/show/Initiatives/GnomeGoals/InstalledTests)

Those tests will be execute on each commit on http://build.gnome.org, so it would be easy to track regressions
Comment 1 Ondrej Holy 2014-08-09 13:26:28 UTC
Review of attachment 282720 [details] [review]:

Thanks for the patch. I haven't tested it at detail yet, however the patch adds following warnings, which should be fixed:

test/Makefile.am:3: warning: NULL multiply defined in condition TRUE ...
glib-tap.mk:12: ... 'NULL' previously defined here
test/Makefile.am:1:   'glib-tap.mk' included from here
test/Makefile.am:13: warning: noinst_PROGRAMS multiply defined in condition TRUE ...
glib-tap.mk:29: ... 'noinst_PROGRAMS' previously defined here
test/Makefile.am:1:   'glib-tap.mk' included from here
test/Makefile.am:65: warning: noinst_DATA multiply defined in condition TRUE ...
glib-tap.mk:31: ... 'noinst_DATA' previously defined here
test/Makefile.am:1:   'glib-tap.mk' included from here
test/Makefile.am:80: warning: CLEANFILES multiply defined in condition TRUE ...
glib-tap.mk:17: ... 'CLEANFILES' previously defined here
test/Makefile.am:1:   'glib-tap.mk' included from here
test/Makefile.am:82: warning: nobase_installed_test_DATA multiply defined in condition TRUE ...
glib-tap.mk:26: ... 'nobase_installed_test_DATA' previously defined here
test/Makefile.am:1:   'glib-tap.mk' included from here
test/Makefile.am:114: warning: EXTRA_DIST multiply defined in condition TRUE ...
glib-tap.mk:20: ... 'EXTRA_DIST' previously defined here
test/Makefile.am:1:   'glib-tap.mk' included from here
Comment 2 Vadim Rutkovsky 2014-08-19 13:59:53 UTC
Created attachment 283893 [details] [review]
Add --enable-installed-tests v2

Attached a better patch.
Comment 3 Ondrej Holy 2014-08-21 14:18:09 UTC
Review of attachment 283893 [details] [review]:

Looks good to me, thanks for test suite integration for the gnome-desktop-testing :-)
Comment 5 Ross Lagerwall 2014-09-27 08:24:46 UTC
The commit still causes some warnings due to the presence of a check target and the check_ variables in glib-tap.mk:
Making all in test
make[2]: Entering directory '/home/ross/src/gnome/gvfs/test'
Makefile:1475: warning: overriding recipe for target 'check'
Makefile:1295: warning: ignoring old recipe for target 'check'
make  all-am
make[3]: Entering directory '/home/ross/src/gnome/gvfs/test'
Makefile:1475: warning: overriding recipe for target 'check'
Makefile:1295: warning: ignoring old recipe for target 'check'
Comment 6 Ondrej Holy 2015-08-11 06:47:57 UTC
Created attachment 309047 [details] [review]
test: Use system services in installed tests

The installed tests doesn't work correctly, because session.conf and *.service contain builddir filepaths...

One possible way to fix this problem is change the file paths in the mentioned files, however we don't want to remove possibility to run uninstalled tests. So it means we have to create bunch of new files just with different file path. I don't like this solution from obvious reason...

Second solution is just remove all the session.conf, *.service, *.monitor files from the installed tests (attached patch). Consequently gvfs-test will automatically use the system ones. However there is problem with the tests which is using keyring. The problem is already mentioned in session.conf:
  <!-- disabled for now; this causes gnome-keyring to be spawned, which can
       interfere with user's real keyrings, as well as causing long delays
       during D-BUS activation -->
  <!-- <standard_session_servicedirs /> -->

Don't you have an idea how to fix it gracefully?
Comment 7 Ondrej Holy 2015-08-11 10:14:04 UTC
I am also facing some problems with selinux when running the tests, but it works correctly on F22 live, so I suppose I have some wrong system configuration... or do you also see following and the tests don't work?

dbus-daemon[428]: Failed to set up security class mapping (selinux_set_mapping():Invalid argument).
Comment 8 Ondrej Holy 2016-05-27 08:26:40 UTC
GVfs tests on build.gnome.org fail with the following output, which is probably caused by the buildroot paths:
http://build.gnome.org/continuous/buildmaster/builds/2016/05/24/4/integrationtest/work-gnome-continuous-x86_64-runtime/installed-test-results/gvfs_gvfs-all-tests.test/output.txt
Comment 9 Ondrej Holy 2016-05-27 08:39:53 UTC
Created attachment 328629 [details] [review]
test: Use system paths in installed tests

Use system paths instead of the buildroot paths, however still with the usage of custom servicedir, which avoids the problems with keyring...
Comment 10 Ondrej Holy 2016-05-27 08:40:16 UTC
I realized that "jhbuild make check" fail on smb tests, however "jhbuild run make check" works properly. It needs more investigation, what is wrong, but it seems it is irrelevant to this changes...
Comment 11 Ondrej Holy 2016-05-27 08:55:53 UTC
(In reply to Ondrej Holy from comment #8)
> GVfs tests on build.gnome.org fail with the following output, which is
> probably caused by the buildroot paths:
> http://build.gnome.org/continuous/buildmaster/builds/2016/05/24/4/
> integrationtest/work-gnome-continuous-x86_64-runtime/installed-test-results/
> gvfs_gvfs-all-tests.test/output.txt

Another problem is that smbd, twistd, httpd, umockdev... seems not available.
Comment 12 Ondrej Holy 2016-05-30 10:48:29 UTC
(In reply to Ondrej Holy from comment #11)
> (In reply to Ondrej Holy from comment #8)
> > GVfs tests on build.gnome.org fail with the following output, which is
> > probably caused by the buildroot paths:
> > http://build.gnome.org/continuous/buildmaster/builds/2016/05/24/4/
> > integrationtest/work-gnome-continuous-x86_64-runtime/installed-test-results/
> > gvfs_gvfs-all-tests.test/output.txt
> 
> Another problem is that smbd, twistd, httpd, umockdev... seems not available.

Pushed commit 0e78e53 and commit 426f1d5 to skip smb/ftp tests if smbd/twistd is not available...
Comment 13 Ondrej Holy 2016-05-30 10:48:57 UTC
Comment on attachment 328629 [details] [review]
test: Use system paths in installed tests

commit 0188305b2537370c807fd9e359084647533f5f4b
Comment 14 Emmanuele Bassi (:ebassi) 2016-05-30 22:40:16 UTC
Commit 0188305b2537370c807fd9e359084647533f5f4b broke the build if builddir != srcdir, which is the default in GNOME Continuous:

make[3]: *** No rule to make target '../../daemon/org.gtk.vfs.Daemon.service', needed by 'all-am'.  Stop.
make[3]: *** Waiting for unfinished jobs....

Reverting the commit fixes the issue.
Comment 15 Emmanuele Bassi (:ebassi) 2016-05-30 22:50:52 UTC
I've tagged gvfs in gnome-continuous, even if I should revert the commit that broke the build, because this issue seems to still be in progress.
Comment 16 Ondrej Holy 2016-05-31 08:13:54 UTC
Thanks for the notice, I have pushed commit 85af0e5 recently, which should fix it.
Comment 17 Ondrej Holy 2016-06-07 13:22:58 UTC
Pushed some other fixes for the test suite (commit c38eada, commit 7f09322, commit 2be06cd), so the build.gnome.org successfully pass ArchiveMounter tests, Trash tests fail due to Bug 747540 in GLib and rest of the tests are properly skipped because of missing dependencies (will look at what we can do with it)... So I think we can close this bug again.